mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
the nss and pam modules in winbind don't have strchr_m() yet, so use
strchr() for the moment
This commit is contained in:
parent
1436c9f424
commit
c2c1f2027e
@ -36,8 +36,8 @@ static void parse_domain_user(char *domuser, fstring domain, fstring user)
|
||||
char *p;
|
||||
char *sep = lp_winbind_separator();
|
||||
if (!sep) sep = "\\";
|
||||
p = strchr_m(domuser,*sep);
|
||||
if (!p) p = strchr_m(domuser,'\\');
|
||||
p = strchr(domuser,*sep);
|
||||
if (!p) p = strchr(domuser,'\\');
|
||||
if (!p) {
|
||||
fstrcpy(domain,"");
|
||||
fstrcpy(user, domuser);
|
||||
@ -286,7 +286,7 @@ int winbind_initgroups(char *user, gid_t gid)
|
||||
|
||||
sep = lp_winbind_separator();
|
||||
|
||||
if (!strchr_m(user, *sep)) {
|
||||
if (!strchr(user, *sep)) {
|
||||
return initgroups(user, gid);
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ int main(int argc, char **argv)
|
||||
char *p;
|
||||
|
||||
fstrcpy(global_myname, myhostname());
|
||||
p = strchr_m(global_myname, '.');
|
||||
p = strchr(global_myname, '.');
|
||||
if (p) {
|
||||
*p = 0;
|
||||
}
|
||||
|
@ -87,13 +87,13 @@ BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize)
|
||||
if (!sep) sep = " \t\n\r";
|
||||
|
||||
/* find the first non sep char */
|
||||
while (*s && strchr_m(sep,*s)) s++;
|
||||
while (*s && strchr(sep,*s)) s++;
|
||||
|
||||
/* nothing left? */
|
||||
if (! *s) return(False);
|
||||
|
||||
/* copy over the token */
|
||||
for (quoted = False; len < bufsize && *s && (quoted || !strchr_m(sep,*s)); s++) {
|
||||
for (quoted = False; len < bufsize && *s && (quoted || !strchr(sep,*s)); s++) {
|
||||
if (*s == '\"') {
|
||||
quoted = !quoted;
|
||||
} else {
|
||||
|
@ -689,7 +689,7 @@ int main(int argc, char **argv)
|
||||
char *p;
|
||||
|
||||
fstrcpy(global_myname, myhostname());
|
||||
p = strchr_m(global_myname, '.');
|
||||
p = strchr(global_myname, '.');
|
||||
if (p) {
|
||||
*p = 0;
|
||||
}
|
||||
|
@ -31,8 +31,8 @@ static void parse_domain_user(char *domuser, fstring domain, fstring user)
|
||||
char *p;
|
||||
char *sep = lp_winbind_separator();
|
||||
if (!sep) sep = "\\";
|
||||
p = strchr_m(domuser,*sep);
|
||||
if (!p) p = strchr_m(domuser,'\\');
|
||||
p = strchr(domuser,*sep);
|
||||
if (!p) p = strchr(domuser,'\\');
|
||||
if (!p) {
|
||||
fstrcpy(domain,"");
|
||||
fstrcpy(user, domuser);
|
||||
|
@ -909,8 +909,8 @@ void parse_domain_user(char *domuser, fstring domain, fstring user)
|
||||
char *p;
|
||||
char *sep = lp_winbind_separator();
|
||||
if (!sep) sep = "\\";
|
||||
p = strchr_m(domuser,*sep);
|
||||
if (!p) p = strchr_m(domuser,'\\');
|
||||
p = strchr(domuser,*sep);
|
||||
if (!p) p = strchr(domuser,'\\');
|
||||
if (!p) {
|
||||
fstrcpy(domain,"");
|
||||
fstrcpy(user, domuser);
|
||||
|
Loading…
x
Reference in New Issue
Block a user