smbd does not support space in user or group name

Lin Li linl at xandros.com
Tue Feb 12 12:37:08 GMT 2002


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?
>
> 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





More information about the samba-technical mailing list