Author: vlendec
Date: 2006-06-09 12:43:34 +0000 (Fri, 09 Jun 2006)
New Revision: 16120

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16120

Log:
Fix a parsing error that became apparent in 'make test': If we have no group
rids in the info3 we set the array buffer pointer to "1" but fail to actually
ship the array.

Fix some debug message.

And the smbclient -L in make test should run anonymously from the start, the
fall back was quite confusing when reading the log files.

Volker

Modified:
   trunk/source/rpc_parse/parse_net.c
   trunk/source/script/tests/selftest.sh
   trunk/source/smbd/trans2.c


Changeset:
Modified: trunk/source/rpc_parse/parse_net.c
===================================================================
--- trunk/source/rpc_parse/parse_net.c  2006-06-09 12:25:25 UTC (rev 16119)
+++ trunk/source/rpc_parse/parse_net.c  2006-06-09 12:43:34 UTC (rev 16120)
@@ -4,7 +4,7 @@
  *  Copyright (C) Andrew Tridgell              1992-1997,
  *  Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
  *  Copyright (C) Paul Ashton                       1997.
- *  Copyright (C) Jean Fran�ois Micouleau           2002.
+ *  Copyright (C) Jean Francois Micouleau           2002.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -1711,29 +1711,24 @@
        if(!prs_align(ps))
                return False;
 
-       if (usr->num_groups > 0) {
+       if(!prs_uint32("num_groups2   ", ps, depth, &usr->num_groups2))        
/* num groups2 */
+               return False;
 
-               if(!prs_uint32("num_groups2   ", ps, depth, &usr->num_groups2)) 
       /* num groups2 */
-                       return False;
+       if (usr->num_groups != usr->num_groups2) {
+               DEBUG(3,("net_io_user_info3: num_groups mismatch! (%d != 
%d)\n", 
+                        usr->num_groups, usr->num_groups2));
+               return False;
+       }
 
-               if (usr->num_groups != usr->num_groups2) {
-                       DEBUG(3,("net_io_user_info3: num_groups mismatch! (%d 
!= %d)\n", 
-                       usr->num_groups, usr->num_groups2));
+       if (UNMARSHALLING(ps)) {
+               usr->gids = PRS_ALLOC_MEM(ps, DOM_GID, usr->num_groups);
+               if (usr->gids == NULL)
                        return False;
-               }
+       }
 
-
-               if (UNMARSHALLING(ps)) {
-                       usr->gids = PRS_ALLOC_MEM(ps, DOM_GID, usr->num_groups);
-                       if (usr->gids == NULL)
-                               return False;
-               }
-
-               for (i = 0; i < usr->num_groups; i++) {
-                       if(!smb_io_gid("", &usr->gids[i], ps, depth)) /* group 
info */
-                               return False;
-               }
-               
+       for (i = 0; i < usr->num_groups; i++) {
+               if(!smb_io_gid("", &usr->gids[i], ps, depth)) /* group info */
+                       return False;
        }
 
        if(!smb_io_unistr2("uni_logon_srv", &usr->uni_logon_srv, 
usr->hdr_logon_srv.buffer, ps, depth)) /* logon server unicode string */

Modified: trunk/source/script/tests/selftest.sh
===================================================================
--- trunk/source/script/tests/selftest.sh       2006-06-09 12:25:25 UTC (rev 
16119)
+++ trunk/source/script/tests/selftest.sh       2006-06-09 12:43:34 UTC (rev 
16120)
@@ -181,8 +181,8 @@
  bin/nmblookup $CONFIGURATION $SERVER
  # make sure smbd is also up set
  echo "wait for smbd"
- bin/smbclient $CONFIGURATION -L $SERVER_IP -N -p 139 | head -2
- bin/smbclient $CONFIGURATION -L $SERVER_IP -N -p 139 | head -2
+ bin/smbclient $CONFIGURATION -L $SERVER_IP -U% -p 139 | head -2
+ bin/smbclient $CONFIGURATION -L $SERVER_IP -U% -p 139 | head -2
 
  failed=0
 

Modified: trunk/source/smbd/trans2.c
===================================================================
--- trunk/source/smbd/trans2.c  2006-06-09 12:25:25 UTC (rev 16119)
+++ trunk/source/smbd/trans2.c  2006-06-09 12:43:34 UTC (rev 16120)
@@ -3436,7 +3436,7 @@
 
                        {
                                int i;
-                               DEBUG(4,("call_trans2qfilepathinfo: 
SMB_QUERY_FILE_UNIX_BASIC"));
+                               DEBUG(4,("call_trans2qfilepathinfo: 
SMB_QUERY_FILE_UNIX_BASIC "));
 
                                for (i=0; i<100; i++)
                                        DEBUG(4,("%d=%x, ",i, (*ppdata)[i]));

Reply via email to