mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-01 14:15:49 +08:00
ITS#8097 nssov: clean up some compiler warnings
This commit is contained in:
parent
dc277009e2
commit
0146e3ddfc
@ -65,7 +65,7 @@ static int write_ether(nssov_ether_cbp *cbp,Entry *entry)
|
||||
{
|
||||
int32_t tmpint32;
|
||||
struct ether_addr tmpaddr;
|
||||
struct berval tmparr[2], empty;
|
||||
struct berval tmparr[2];
|
||||
struct berval *names,*ethers;
|
||||
Attribute *a;
|
||||
int i,j;
|
||||
|
@ -50,7 +50,7 @@ NSSOV_CBPRIV(host,
|
||||
/* write a single host entry to the stream */
|
||||
static int write_host(nssov_host_cbp *cbp,Entry *entry)
|
||||
{
|
||||
int32_t tmpint32,tmp2int32,tmp3int32;
|
||||
int32_t tmpint32;
|
||||
int numaddr,i,numname,dupname;
|
||||
struct berval name,*names,*addrs;
|
||||
Attribute *a;
|
||||
|
@ -50,7 +50,7 @@ NSSOV_CBPRIV(network,
|
||||
/* write a single network entry to the stream */
|
||||
static int write_network(nssov_network_cbp *cbp,Entry *entry)
|
||||
{
|
||||
int32_t tmpint32,tmp2int32,tmp3int32;
|
||||
int32_t tmpint32;
|
||||
int numaddr,i,numname,dupname;
|
||||
struct berval name, *names, *addrs;
|
||||
Attribute *a;
|
||||
|
@ -46,7 +46,7 @@ AttributeDescription *nssov_pam_svc_ad;
|
||||
#define WRITEBUFFER_MAXSIZE 64*1024
|
||||
|
||||
/* Find the given attribute's value in the RDN of the DN */
|
||||
int nssov_find_rdnval(struct berval *dn, AttributeDescription *ad, struct berval *value)
|
||||
void nssov_find_rdnval(struct berval *dn, AttributeDescription *ad, struct berval *value)
|
||||
{
|
||||
struct berval rdn;
|
||||
char *next;
|
||||
@ -406,10 +406,10 @@ static void *acceptconn(void *ctx, void *arg)
|
||||
if ((errno==EINTR)||(errno==EAGAIN)||(errno==EWOULDBLOCK))
|
||||
{
|
||||
Debug( LDAP_DEBUG_TRACE,"nssov: accept() failed (ignored): %s",strerror(errno),0,0);
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
Debug( LDAP_DEBUG_ANY,"nssov: accept() failed: %s",strerror(errno),0,0);
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
/* make sure O_NONBLOCK is not inherited */
|
||||
if ((j=fcntl(csock,F_GETFL,0))<0)
|
||||
@ -417,14 +417,14 @@ static void *acceptconn(void *ctx, void *arg)
|
||||
Debug( LDAP_DEBUG_ANY,"nssov: fcntl(F_GETFL) failed: %s",strerror(errno),0,0);
|
||||
if (close(csock))
|
||||
Debug( LDAP_DEBUG_ANY,"nssov: problem closing socket: %s",strerror(errno),0,0);
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
if (fcntl(csock,F_SETFL,j&~O_NONBLOCK)<0)
|
||||
{
|
||||
Debug( LDAP_DEBUG_ANY,"nssov: fcntl(F_SETFL,~O_NONBLOCK) failed: %s",strerror(errno),0,0);
|
||||
if (close(csock))
|
||||
Debug( LDAP_DEBUG_ANY,"nssov: problem closing socket: %s",strerror(errno),0,0);
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
connection_fake_init( &conn, &opbuf, ctx );
|
||||
@ -435,6 +435,8 @@ static void *acceptconn(void *ctx, void *arg)
|
||||
|
||||
/* handle the connection */
|
||||
handleconnection(ni,csock,op);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static slap_verbmasks nss_svcs[] = {
|
||||
@ -769,7 +771,6 @@ nssov_db_init(
|
||||
{
|
||||
slap_overinst *on = (slap_overinst *)be->bd_info;
|
||||
nssov_info *ni;
|
||||
nssov_mapinfo *mi;
|
||||
int rc;
|
||||
|
||||
rc = nssov_pam_init();
|
||||
@ -802,6 +803,7 @@ nssov_db_destroy(
|
||||
BackendDB *be,
|
||||
ConfigReply *cr )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -958,6 +960,7 @@ nssov_db_close(
|
||||
strerror(errno),0,0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static slap_overinst nssov;
|
||||
|
@ -164,6 +164,9 @@ void nssov_cfg_init(nssov_info *ni,const char *fname);
|
||||
} \
|
||||
} \
|
||||
|
||||
/* Find the given attribute's value in the RDN of the DN. */
|
||||
void nssov_find_rdnval(struct berval *dn,AttributeDescription *ad,struct berval *value);
|
||||
|
||||
/* This tries to get the user password attribute from the entry.
|
||||
It will try to return an encrypted password as it is used in /etc/passwd,
|
||||
/etc/group or /etc/shadow depending upon what is in the directory.
|
||||
@ -303,7 +306,6 @@ int pam_pwmod(nssov_info *ni,TFILE *fp,Operation *op,uid_t calleruid);
|
||||
{ \
|
||||
/* define common variables */ \
|
||||
int32_t tmpint32; \
|
||||
int rc; \
|
||||
nssov_##db##_cbp cbp; \
|
||||
slap_callback cb = {0}; \
|
||||
SlapReply rs = {REP_RESULT}; \
|
||||
|
@ -19,6 +19,9 @@
|
||||
#include "nssov.h"
|
||||
#include "lutil.h"
|
||||
|
||||
#undef ldap_debug /* silence a warning in ldap-int.h */
|
||||
#include "../../../libraries/libldap/ldap-int.h" /* for ldap_ld_free */
|
||||
|
||||
static int ppolicy_cid;
|
||||
static AttributeDescription *ad_loginStatus;
|
||||
|
||||
|
@ -207,7 +207,6 @@ static int write_passwd(nssov_passwd_cbp *cbp,Entry *entry)
|
||||
{
|
||||
int32_t tmpint32;
|
||||
struct berval tmparr[2], tmpuid[2];
|
||||
const char **tmpvalues;
|
||||
char *tmp;
|
||||
struct berval *names;
|
||||
struct berval *uids;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
/*
|
||||
/* ACKNOWLEDGEMENTS:
|
||||
* ACKNOWLEDGEMENTS:
|
||||
* This code references portions of the nss-ldapd package
|
||||
* written by Arthur de Jong. The nss-ldapd code was forked
|
||||
* from the nss-ldap library written by Luke Howard.
|
||||
@ -50,7 +50,7 @@ NSSOV_CBPRIV(protocol,
|
||||
|
||||
static int write_protocol(nssov_protocol_cbp *cbp,Entry *entry)
|
||||
{
|
||||
int32_t tmpint32,tmp2int32,tmp3int32;
|
||||
int32_t tmpint32;
|
||||
int i,numname,dupname,proto;
|
||||
struct berval name,*names;
|
||||
Attribute *a;
|
||||
|
@ -52,7 +52,7 @@ NSSOV_CBPRIV(rpc,
|
||||
/* write a single rpc entry to the stream */
|
||||
static int write_rpc(nssov_rpc_cbp *cbp,Entry *entry)
|
||||
{
|
||||
int32_t tmpint32,tmp2int32,tmp3int32;
|
||||
int32_t tmpint32;
|
||||
int i,numname,dupname,number;
|
||||
struct berval name,*names;
|
||||
Attribute *a;
|
||||
|
@ -112,8 +112,8 @@ NSSOV_CBPRIV(service,
|
||||
|
||||
static int write_service(nssov_service_cbp *cbp,Entry *entry)
|
||||
{
|
||||
int32_t tmpint32,tmp2int32,tmp3int32;
|
||||
struct berval name,*names,*ports,*protos;
|
||||
int32_t tmpint32;
|
||||
struct berval name,*names,*protos;
|
||||
struct berval tmparr[2];
|
||||
Attribute *a;
|
||||
char *tmp;
|
||||
|
Loading…
Reference in New Issue
Block a user