smbd does not support space in user or group name
Gerald Carter
jerry at samba.org
Tue Feb 12 14:26:42 GMT 2002
On Tue, 12 Feb 2002, Lin Li wrote:
> Lin Li wrote:
>
> > The winbind enables the use of domain users and groups. The domain user
> > or group name may contain space such as "Domain Users". But the smbd
> > does not support this. So I can not access those shares which have their
> > permission granted to users and groups like "Domain Users". Is it
> > possible to remove the space in "LIST_SEP" in the include/local.h or not
> > to use "LIST_SEP" when getting user and group from user list and group
> > list?
Hmmm... I though you could simply do something like
valid users = " @"Domain Users" "
jerry
> >
> > Thanks,
> > Lin
>
> I made following change to solve this problem. (use 2.2.3a)
> -------------------------------------------------------
> --- smbd/password.c Tue Feb 12 15:21:49 2002
> +++ smbd/password.c.old Tue Feb 12 12:16:54 2002
> @@ -358,7 +358,7 @@
> if (strlen(suser) + strlen(session_users) + 2 >=
> sizeof(pstring))
> DEBUG(1,("Too many session users??\n"));
> else {
> - pstrcat(session_users,"\t");
> + pstrcat(session_users," ");
> pstrcat(session_users,suser);
> }
> }
> @@ -786,8 +786,8 @@
> if (!user_list)
> return(False);
>
> - for (auser=strtok(user_list,"\t,;:\n\r"); !ok &&
> auser;
> -
> auser = strtok(NULL,"\t,;:\n\r")) {
> + for (auser=strtok(user_list,LIST_SEP); !ok &&
> auser;
> +
> auser = strtok(NULL,LIST_SEP)) {
> fstring user2;
> fstrcpy(user2,auser);
> if (!user_ok(user2,snum))
>
> --- lib/username.c Tue Feb 12 15:23:02 2002
> +++ lib/username.c.old Sat Feb 2 19:46:42 2002
> @@ -449,7 +449,7 @@
>
> DEBUG(10,("user_in_list: checking user %s in list %s\n", user,
> list));
>
> - while (next_token(&p,tok,"\t,;:\n\r", sizeof(tok))) {
> + while (next_token(&p,tok,LIST_SEP, sizeof(tok))) {
>
> DEBUG(10,("user_in_list: checking user |%s| in group
> |%s|\n", user, tok));
> -------------------------------------------------------
> Will this cause any problem?
>
> Thanks,
> Lin
>
>
>
>
--
---------------------------------------------------------------------
Hewlett-Packard http://www.hp.com
SAMBA Team http://www.samba.org
-- http://www.plainjoe.org
"Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2
--"I never saved anything for the swim back." Ethan Hawk in Gattaca--
More information about the samba-technical
mailing list