diff options
author | Derrell Lipman <derrell@samba.org> | 2005-03-31 05:06:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:24 -0500 |
commit | 994694f7f26da5099f071e1381271a70407f33bb (patch) | |
tree | 5575bb9592285b16cf5f51493c9f035f96a1e893 /source/nsswitch | |
parent | 989fcb4c084c63f1e3b114af68ef5bc0a2fbc09e (diff) | |
download | samba-994694f7f26da5099f071e1381271a70407f33bb.tar.gz samba-994694f7f26da5099f071e1381271a70407f33bb.tar.xz samba-994694f7f26da5099f071e1381271a70407f33bb.zip |
r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
provided by smbc_getxattr() et al, when requesting all attributes,
all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
compiler flags are in use. removed -Wcast-qual flag from list, as that
is specifically to force warnings in the case of casting away qualifiers.
Note: In the process of eliminating compiler warnings, a few nasties were
discovered. In the file libads/sasl.c, PRIVATE kerberos interfaces
are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
kerberos interfaces are being used. Someone who knows kerberos
should look at these and determine if there is an alternate method
of accomplishing the task.
Diffstat (limited to 'source/nsswitch')
-rw-r--r-- | source/nsswitch/wb_common.c | 7 | ||||
-rw-r--r-- | source/nsswitch/winbindd_nss.h | 2 | ||||
-rw-r--r-- | source/nsswitch/winbindd_rpc.c | 2 | ||||
-rw-r--r-- | source/nsswitch/winbindd_util.c | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c index 9caf7affc39..6ba0cbbf428 100644 --- a/source/nsswitch/wb_common.c +++ b/source/nsswitch/wb_common.c @@ -26,6 +26,9 @@ #include "winbind_client.h" +#define CONST_DISCARD(type, ptr) ((type) ((void *) (ptr))) +#define CONST_ADD(type, ptr) ((type) ((const void *) (ptr))) + /* Global variables. These are effectively the client state information */ int winbindd_fd = -1; /* fd for winbindd socket */ @@ -606,14 +609,14 @@ NSS_STATUS winbindd_request(int req_type, BOOL winbind_off( void ) { - static char *s = WINBINDD_DONT_ENV "=1"; + static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV "=1"); return putenv(s) != -1; } BOOL winbind_on( void ) { - static char *s = WINBINDD_DONT_ENV "=0"; + static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV "=0"); return putenv(s) != -1; } diff --git a/source/nsswitch/winbindd_nss.h b/source/nsswitch/winbindd_nss.h index 838ba1e211e..06ebd68f8f8 100644 --- a/source/nsswitch/winbindd_nss.h +++ b/source/nsswitch/winbindd_nss.h @@ -11,7 +11,7 @@ */ #ifndef SAFE_FREE -#define SAFE_FREE(x) do { if(x) {free((void *) (x)); x=NULL;} } while(0) +#define SAFE_FREE(x) do { if(x) {free(CONST_DISCARD(void *, (x))); x=NULL;} } while(0) #endif #ifndef _WINBINDD_NTDOM_H diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c index 5e974736e3d..1dfa810a8d3 100644 --- a/source/nsswitch/winbindd_rpc.c +++ b/source/nsswitch/winbindd_rpc.c @@ -789,7 +789,7 @@ static int get_ldap_seq(const char *server, int port, uint32 *seq) to.tv_usec = 0; if (ldap_search_st(ldp, "", LDAP_SCOPE_BASE, "(objectclass=*)", - (char **) &attrs[0], 0, &to, &res)) + CONST_DISCARD(char **, &attrs[0]), 0, &to, &res)) goto done; if (ldap_count_entries(ldp, res) != 1) diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index 3d03d6f4cc4..9ae24e401fd 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/nsswitch/winbindd_util.c @@ -636,7 +636,7 @@ BOOL parse_domain_user(const char *domuser, fstring domain, fstring user) */ void fill_domain_username(fstring name, const char *domain, const char *user) { - strlower_m( (char *) user ); + strlower_m(CONST_DISCARD(char *, user)); if (assume_domain(domain)) { strlcpy(name, user, sizeof(fstring)); |