blob: 4aa1878e280b5ce66beb69a9b6dcc345c17ba195 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <nss.h>
#include "nslcd-client.h"
#include "common.h"
/* translates a nsklcd return code (as defined in nslcd.h) to
a nss code (as defined in nss.h) */
enum nss_status nslcd2nss(int code)
{
switch (code)
{
case NSLCD_RS_UNAVAIL: return NSS_STATUS_UNAVAIL;
case NSLCD_RS_NOTFOUND: return NSS_STATUS_NOTFOUND;
case NSLCD_RS_SUCCESS: return NSS_STATUS_SUCCESS;
case NSLCD_RS_SMALLBUF: return NSS_STATUS_TRYAGAIN;
default: return NSS_STATUS_UNAVAIL;
}
}
|