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 | 9840db418bad5a39edc4a32a1786f5e2d2c9dff8 (patch) | |
tree | 4116543c742e1563ae869e1053583dbabf4195b5 /source3/lib/util_unistr.c | |
parent | b76112f2116c3c08c7656387a4a49ea64915f470 (diff) | |
download | samba-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/lib/util_unistr.c')
-rw-r--r-- | source3/lib/util_unistr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index 04985c6ab6..0b4552e1f5 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -398,10 +398,10 @@ size_t strnlen_w(const smb_ucs2_t *src, size_t max) smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c) { while (*s != 0) { - if (c == *s) return (smb_ucs2_t *)s; + if (c == *s) return CONST_DISCARD(smb_ucs2_t *, s); s++; } - if (c == *s) return (smb_ucs2_t *)s; + if (c == *s) return CONST_DISCARD(smb_ucs2_t *, s); return NULL; } @@ -422,7 +422,7 @@ smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c) if (len == 0) return NULL; p += (len - 1); do { - if (c == *p) return (smb_ucs2_t *)p; + if (c == *p) return CONST_DISCARD(smb_ucs2_t *, p); } while (p-- != s); return NULL; } @@ -443,7 +443,7 @@ smb_ucs2_t *strnrchr_w(const smb_ucs2_t *s, smb_ucs2_t c, unsigned int n) n--; if (!n) - return (smb_ucs2_t *)p; + return CONST_DISCARD(smb_ucs2_t *, p); } while (p-- != s); return NULL; } @@ -461,7 +461,7 @@ smb_ucs2_t *strstr_w(const smb_ucs2_t *s, const smb_ucs2_t *ins) return NULL; inslen = strlen_w(ins); - r = (smb_ucs2_t *)s; + r = CONST_DISCARD(smb_ucs2_t *, s); while ((r = strchr_w(r, *ins))) { if (strncmp_w(r, ins, inslen) == 0) @@ -732,7 +732,7 @@ smb_ucs2_t *strpbrk_wa(const smb_ucs2_t *s, const char *p) int i; for (i=0; p[i] && *s != UCS2_CHAR(p[i]); i++) ; - if (p[i]) return (smb_ucs2_t *)s; + if (p[i]) return CONST_DISCARD(smb_ucs2_t *, s); s++; } return NULL; @@ -747,7 +747,7 @@ smb_ucs2_t *strstr_wa(const smb_ucs2_t *s, const char *ins) return NULL; inslen = strlen(ins); - r = (smb_ucs2_t *)s; + r = CONST_DISCARD(smb_ucs2_t *, s); while ((r = strchr_w(r, UCS2_CHAR(*ins)))) { if (strncmp_wa(r, ins, inslen) == 0) |