svn commit: samba r5431 - in branches/SAMBA_3_0/source: auth lib
jerry at samba.org
jerry at samba.org
Thu Feb 17 15:17:16 GMT 2005
Author: jerry
Date: 2005-02-17 15:17:16 +0000 (Thu, 17 Feb 2005)
New Revision: 5431
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5431
Log:
couple of cimpile fixes from Jason Mader <jason at ncac.gwu.edu> -- BUGS 2341 & 2342
Modified:
branches/SAMBA_3_0/source/auth/auth_util.c
branches/SAMBA_3_0/source/lib/util_unistr.c
Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0/source/auth/auth_util.c 2005-02-17 14:57:08 UTC (rev 5430)
+++ branches/SAMBA_3_0/source/auth/auth_util.c 2005-02-17 15:17:16 UTC (rev 5431)
@@ -61,7 +61,6 @@
void auth_add_user_script(const char *domain, const char *username)
{
- uint32 rid;
/*
* User validated ok against Domain controller.
* If the admin wants us to try and create a UNIX
@@ -79,7 +78,6 @@
if ( !winbind_create_user(username, NULL) ) {
DEBUG(5,("auth_add_user_script: winbindd_create_user() failed\n"));
- rid = 0;
}
}
}
Modified: branches/SAMBA_3_0/source/lib/util_unistr.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util_unistr.c 2005-02-17 14:57:08 UTC (rev 5430)
+++ branches/SAMBA_3_0/source/lib/util_unistr.c 2005-02-17 15:17:16 UTC (rev 5431)
@@ -454,16 +454,20 @@
smb_ucs2_t *strstr_w(const smb_ucs2_t *s, const smb_ucs2_t *ins)
{
smb_ucs2_t *r;
- size_t slen, inslen;
+ size_t inslen;
- if (!s || !*s || !ins || !*ins) return NULL;
- slen = strlen_w(s);
+ if (!s || !*s || !ins || !*ins)
+ return NULL;
+
inslen = strlen_w(ins);
r = (smb_ucs2_t *)s;
+
while ((r = strchr_w(r, *ins))) {
- if (strncmp_w(r, ins, inslen) == 0) return r;
+ if (strncmp_w(r, ins, inslen) == 0)
+ return r;
r++;
}
+
return NULL;
}
@@ -736,16 +740,20 @@
smb_ucs2_t *strstr_wa(const smb_ucs2_t *s, const char *ins)
{
smb_ucs2_t *r;
- size_t slen, inslen;
+ size_t inslen;
- if (!s || !*s || !ins || !*ins) return NULL;
- slen = strlen_w(s);
+ if (!s || !*s || !ins || !*ins)
+ return NULL;
+
inslen = strlen(ins);
r = (smb_ucs2_t *)s;
+
while ((r = strchr_w(r, UCS2_CHAR(*ins)))) {
- if (strncmp_wa(r, ins, inslen) == 0) return r;
+ if (strncmp_wa(r, ins, inslen) == 0)
+ return r;
r++;
}
+
return NULL;
}
More information about the samba-cvs
mailing list