smbd does not support space in user or group name

Tim Potter tpot at samba.org
Tue Feb 12 13:43:29 GMT 2002


On Tue, Feb 12, 2002 at 03:31:40PM -0500, 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?
>
> 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," ");

It is traditional when making diffs to put the old version as the first
argument followed by the new version.  This way lines that added have a
+ in front of them and lines deleted a -.

> -                       for (auser=strtok(user_list,"\t,;:\n\r"); !ok &&
> auser;

Hmm - the strtok should really be changed to a call to next_token() but
this was present before your patch.

Apart from that it looks OK.


Tim.




More information about the samba-technical mailing list