summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2005-03-31 05:06:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:24 -0500
commit9840db418bad5a39edc4a32a1786f5e2d2c9dff8 (patch)
tree4116543c742e1563ae869e1053583dbabf4195b5 /source3/nsswitch
parentb76112f2116c3c08c7656387a4a49ea64915f470 (diff)
downloadsamba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.tar.gz
samba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.tar.bz2
samba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.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. (This used to be commit 994694f7f26da5099f071e1381271a70407f33bb)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wb_common.c7
-rw-r--r--source3/nsswitch/winbindd_nss.h2
-rw-r--r--source3/nsswitch/winbindd_rpc.c2
-rw-r--r--source3/nsswitch/winbindd_util.c2
4 files changed, 8 insertions, 5 deletions
diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c
index 9caf7affc3..6ba0cbbf42 100644
--- a/source3/nsswitch/wb_common.c
+++ b/source3/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/source3/nsswitch/winbindd_nss.h b/source3/nsswitch/winbindd_nss.h
index 838ba1e211..06ebd68f8f 100644
--- a/source3/nsswitch/winbindd_nss.h
+++ b/source3/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/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c
index 5e974736e3..1dfa810a8d 100644
--- a/source3/nsswitch/winbindd_rpc.c
+++ b/source3/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/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 3d03d6f4cc..9ae24e401f 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/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));