summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-01 14:07:42 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-06-02 02:13:49 +0200
commit664af060ac9ea83b565fbb817bb63d67d83843ef (patch)
tree182d2893bdf6376340de9990b39828725c709e08 /lib
parent954da1b81ec1a4ef9b417885e3a587b9c49b7056 (diff)
downloadsamba-664af060ac9ea83b565fbb817bb63d67d83843ef.tar.gz
samba-664af060ac9ea83b565fbb817bb63d67d83843ef.tar.bz2
samba-664af060ac9ea83b565fbb817bb63d67d83843ef.zip
lib/replace: We cannot use strchr_m in lib/replace
In any case, it is always safe to search for . even in a multibyte string. Andrew Bartlett
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/xattr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/replace/xattr.c b/lib/replace/xattr.c
index e3e0768d9c..192784f344 100644
--- a/lib/replace/xattr.c
+++ b/lib/replace/xattr.c
@@ -55,7 +55,7 @@ ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t si
ssize_t retval;
int attrnamespace = (strncmp(name, "system", 6) == 0) ?
EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
- const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
+ const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1;
/*
* The BSD implementation has a nasty habit of silently truncating
* the returned value to the size of the buffer, so we have to check
@@ -111,7 +111,7 @@ ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size)
ssize_t retval;
int attrnamespace = (strncmp(name, "system", 6) == 0) ?
EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
- const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
+ const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1;
if((retval=extattr_get_fd(filedes, attrnamespace, attrname, NULL, 0)) >= 0) {
if(retval > size) {
@@ -385,7 +385,7 @@ int rep_removexattr (const char *path, const char *name)
char *s;
int attrnamespace = (strncmp(name, "system", 6) == 0) ?
EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
- const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
+ const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1;
return extattr_delete_file(path, attrnamespace, attrname);
#elif defined(HAVE_ATTR_REMOVE)
@@ -424,7 +424,7 @@ int rep_fremovexattr (int filedes, const char *name)
char *s;
int attrnamespace = (strncmp(name, "system", 6) == 0) ?
EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
- const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
+ const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1;
return extattr_delete_fd(filedes, attrnamespace, attrname);
#elif defined(HAVE_ATTR_REMOVEF)
@@ -464,7 +464,7 @@ int rep_setxattr (const char *path, const char *name, const void *value, size_t
int retval = 0;
int attrnamespace = (strncmp(name, "system", 6) == 0) ?
EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
- const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
+ const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1;
if (flags) {
/* Check attribute existence */
retval = extattr_get_file(path, attrnamespace, attrname, NULL, 0);
@@ -529,7 +529,7 @@ int rep_fsetxattr (int filedes, const char *name, const void *value, size_t size
int retval = 0;
int attrnamespace = (strncmp(name, "system", 6) == 0) ?
EXTATTR_NAMESPACE_SYSTEM : EXTATTR_NAMESPACE_USER;
- const char *attrname = ((s=strchr_m(name, '.')) == NULL) ? name : s + 1;
+ const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1;
if (flags) {
/* Check attribute existence */
retval = extattr_get_fd(filedes, attrnamespace, attrname, NULL, 0);