The Samba-Bugzilla – Attachment 1876 Details for
Bug 3729
double qutoes in passwords an unix password sync
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ugly patch that solves the problem
unix_pwsync_dq.patch (text/plain), 1.57 KB, created by
Mark Pröhl (dead mail address)
on 2006-04-26 05:28:45 UTC
(
hide
)
Description:
ugly patch that solves the problem
Filename:
MIME Type:
Creator:
Mark Pröhl (dead mail address)
Created:
2006-04-26 05:28:45 UTC
Size:
1.57 KB
patch
obsolete
>diff -Naur samba-3.0.21c.org/source/lib/util_str.c samba-3.0.21c/source/lib/util_str.c >--- samba-3.0.21c.org/source/lib/util_str.c 2006-02-20 21:33:21.000000000 +0100 >+++ samba-3.0.21c/source/lib/util_str.c 2006-03-08 22:52:41.126596675 +0100 >@@ -76,6 +76,48 @@ > return(True); > } > >+ >+BOOL next_token_nodq(const char **ptr,char *buff, const char *sep, size_t bufsize) >+{ >+ char *s; >+ char *pbuf; >+ BOOL quoted; >+ size_t len=1; >+ >+ if (!ptr) >+ return(False); >+ >+ s = (char *)*ptr; >+ >+ /* default to simple separators */ >+ if (!sep) >+ sep = " \t\n\r"; >+ >+ /* find the first non sep char */ >+ while (*s && strchr_m(sep,*s)) >+ s++; >+ >+ /* nothing left? */ >+ if (! *s) >+ return(False); >+ >+ /* copy over the token */ >+ pbuf = buff; >+ for (quoted = False; len < bufsize && *s && (quoted || !strchr_m(sep,*s)); s++) { >+ // if ( *s == '\"' ) { >+ // quoted = !quoted; >+ // } else { >+ len++; >+ *pbuf++ = *s; >+ // } >+ } >+ >+ *ptr = (*s) ? s+1 : s; >+ *pbuf = 0; >+ >+ return(True); >+} >+ > /** > This is like next_token but is not re-entrant and "remembers" the first > parameter so you can pass NULL. This is useful for user interface code >diff -Naur samba-3.0.21c.org/source/smbd/chgpasswd.c samba-3.0.21c/source/smbd/chgpasswd.c >--- samba-3.0.21c.org/source/smbd/chgpasswd.c 2006-01-25 00:46:32.000000000 +0100 >+++ samba-3.0.21c/source/smbd/chgpasswd.c 2006-03-08 22:52:58.479525368 +0100 >@@ -317,7 +317,7 @@ > return False; > } > >- if (!next_token(&seq, issue, NULL, sizeof(issue))) >+ if (!next_token_nodq(&seq, issue, NULL, sizeof(issue))) > fstrcpy(issue, "."); > > pwd_sub(issue);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3729
: 1876