[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Thu May 5 23:51:01 MDT 2011
The branch, master has been updated
via f455772 s3-winbind: another strlcpy()/fstring fix
via 2fc8ad8 s3-auth: fixed bug with usernames longer than sizeof(char *)
from 153a091 Fix const in smbtorture.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f455772b99dec88ae0eafc3206d42d88de89461d
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri May 6 14:49:36 2011 +1000
s3-winbind: another strlcpy()/fstring fix
Autobuild-User: Andrew Tridgell <tridge at samba.org>
Autobuild-Date: Fri May 6 07:50:33 CEST 2011 on sn-devel-104
commit 2fc8ad88871bf8287e22cc13cea5d4dc4ddbeb61
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri May 6 14:00:27 2011 +1000
s3-auth: fixed bug with usernames longer than sizeof(char *)
using sizeof(user) when user is "fstring user" as a C parameter
actually returns sizeof(char *), which means that long usernames
aren't allowed.
Jeremy, you need a longer username :-)
Cheers, Tridge
Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/password.c | 6 +++---
source3/winbindd/idmap_hash/mapfile.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 3438434..69b3759 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -644,7 +644,7 @@ bool authorise_login(struct smbd_server_connection *sconn,
get_session_workgroup(sconn),
user2,password)) {
ok = True;
- strlcpy(user,user2,sizeof(user));
+ strlcpy(user,user2,sizeof(fstring));
DEBUG(3,("authorise_login: ACCEPTED: session "
"list username (%s) and given "
"password ok\n", user));
@@ -695,7 +695,7 @@ bool authorise_login(struct smbd_server_connection *sconn,
get_session_workgroup(sconn),
user2,password)) {
ok = True;
- strlcpy(user,user2,sizeof(user));
+ strlcpy(user,user2,sizeof(fstring));
DEBUG(3,("authorise_login: ACCEPTED: "
"user list username and "
"given password ok (%s)\n",
@@ -714,7 +714,7 @@ bool authorise_login(struct smbd_server_connection *sconn,
fstrcpy(guestname,lp_guestaccount());
guest_pw = Get_Pwnam_alloc(talloc_tos(), guestname);
if (guest_pw != NULL) {
- strlcpy(user,guestname,sizeof(user));
+ strlcpy(user,guestname,sizeof(fstring));
ok = True;
DEBUG(3,("authorise_login: ACCEPTED: guest account "
"and guest ok (%s)\n", user));
diff --git a/source3/winbindd/idmap_hash/mapfile.c b/source3/winbindd/idmap_hash/mapfile.c
index 1183328..075f0f2 100644
--- a/source3/winbindd/idmap_hash/mapfile.c
+++ b/source3/winbindd/idmap_hash/mapfile.c
@@ -87,8 +87,8 @@ static bool mapfile_read_line(fstring key, fstring value)
*p = '\0';
p++;
- strlcpy(key, buffer, sizeof(key));
- strlcpy(value, p, sizeof(value));
+ strlcpy(key, buffer, sizeof(fstring));
+ strlcpy(value, p, sizeof(fstring));
/* Eat whitespace */
--
Samba Shared Repository
More information about the samba-cvs
mailing list