svn commit: samba r14059 - in branches/SAMBA_4_0/source/torture/raw: .

2006-03-08 Thread tridge
Author: tridge
Date: 2006-03-09 03:52:10 + (Thu, 09 Mar 2006)
New Revision: 14059

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

Log:

change notify is quite a bit more complex than we thought. These tests
show that w2k3 buffers notifies on directories where you have used
notify previously, thus giving you notifications on events that happen
even when you do not have a current notify call outstanding. This
makes it much easier for clients to avoid race conditions, which is
probably why it is done. It also means that associating change
notifies in Samba with outstanding change notify requests won't work -
instead we have to associate them with buffers on open directories.


Modified:
   branches/SAMBA_4_0/source/torture/raw/notify.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/notify.c
===
--- branches/SAMBA_4_0/source/torture/raw/notify.c  2006-03-09 00:59:54 UTC 
(rev 14058)
+++ branches/SAMBA_4_0/source/torture/raw/notify.c  2006-03-09 03:52:10 UTC 
(rev 14059)
@@ -22,6 +22,7 @@
 #include "torture/torture.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/libcli.h"
+#include "system/filesys.h"
 
 #define BASEDIR "\\test_notify"
 
@@ -36,7 +37,7 @@
 
 #define CHECK_VAL(v, correct) do { \
if ((v) != (correct)) { \
-   printf("(%d) wrong value for %s  0x%x - 0x%x\n", \
+   printf("(%d) wrong value for %s  0x%x should be 0x%x\n", \
   __LINE__, #v, (int)v, (int)correct); \
ret = False; \
goto done; \
@@ -61,8 +62,9 @@
NTSTATUS status;
struct smb_notify notify;
union smb_open io;
-   int fnum = -1;
-   struct smbcli_request *req;
+   int i, count, fnum, fnum2;
+   struct smbcli_request *req, *req2;
+   extern int torture_numops;

if (!torture_open_connection(&cli)) {
return False;
@@ -94,9 +96,13 @@
CHECK_STATUS(status, NT_STATUS_OK);
fnum = io.ntcreatex.out.fnum;
 
+   status = smb_raw_open(cli->tree, mem_ctx, &io);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   fnum2 = io.ntcreatex.out.fnum;
+
/* ask for a change notify */
-   notify.in.buffer_size = 4096;
-   notify.in.completion_filter = 0xFF;
+   notify.in.buffer_size = 1000;
+   notify.in.completion_filter = 0x3;
notify.in.fnum = fnum;
notify.in.recursive = True;
 
@@ -131,6 +137,80 @@
status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify);
CHECK_STATUS(status, NT_STATUS_CANCELLED);
 
+   count = torture_numops;
+   printf("testing buffered notify on create of %d files\n", count);
+   for (i=0;itree, fname, O_CREAT|O_RDWR, 
DENY_NONE);
+   if (fnum3 == -1) {
+   printf("Failed to create %s - %s\n", 
+  fname, smbcli_errstr(cli->tree));
+   ret = False;
+   goto done;
+   }
+   talloc_free(fname);
+   smbcli_close(cli->tree, fnum3);
+   }
+
+   /* setup a new notify on a different directory handle. This
+  new notify won't see the events above. */
+   notify.in.fnum = fnum2;
+   req2 = smb_raw_changenotify_send(cli->tree, ¬ify);
+
+   /* whereas this notify will see the above buffered events as
+  well */
+   notify.in.fnum = fnum;
+   req = smb_raw_changenotify_send(cli->tree, ¬ify);
+
+   status = smbcli_unlink(cli->tree, BASEDIR "\\test0.txt");
+   CHECK_STATUS(status, NT_STATUS_OK);
+
+   /* receive the reply from the 2nd notify */
+   status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify);
+   CHECK_STATUS(status, NT_STATUS_OK);
+
+   CHECK_VAL(notify.out.num_changes, count+1);
+   for (i=0;itree, ¬ify);
+   status = smbcli_unlink(cli->tree, BASEDIR "\\test*.txt");
+   CHECK_STATUS(status, NT_STATUS_OK);
+
+   status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify);
+   CHECK_STATUS(status, NT_STATUS_OK);
+
+   CHECK_VAL(notify.out.num_changes, 1);
+   CHECK_VAL(notify.out.changes[0].action, NOTIFY_ACTION_REMOVED);
+   CHECK_WSTR(notify.out.changes[0].name, "test0.txt", STR_UNICODE);
+
+   /* and we now see the rest of the unlink calls */
+   req = smb_raw_changenotify_send(cli->tree, ¬ify);
+   status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   CHECK_VAL(notify.out.num_changes, count-1);
+   for (i=0;itree, ¬ify);
+   status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   CHECK_VAL(notify.out.num_changes, count-1);
+   for (i=0;isession);
smbcli_deltree(cli->tree, BASEDIR);



svn commit: samba r14058 - in branches/SAMBA_4_0/source/libnet: .

2006-03-08 Thread abartlet
Author: abartlet
Date: 2006-03-09 00:59:54 + (Thu, 09 Mar 2006)
New Revision: 14058

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

Log:
Try to make the continuation on the list of password set mechs clearer.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libnet/libnet_passwd.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_passwd.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_passwd.c2006-03-08 21:46:16 UTC 
(rev 14057)
+++ branches/SAMBA_4_0/source/libnet/libnet_passwd.c2006-03-09 00:59:54 UTC 
(rev 14058)
@@ -480,9 +480,12 @@
for (i=0; i < ARRAY_SIZE(levels); i++) {
r->generic.level = levels[i];
status = libnet_SetPassword(ctx, mem_ctx, r);
-   if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) && 
!NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
-   break;
+   if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)
+   || NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+   /* Try another password set mechanism */
+   continue;
}
+   break;
}

return status;



Build status as of Thu Mar 9 00:00:01 2006

2006-03-08 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-03-08 
00:00:04.0 +
+++ /home/build/master/cache/broken_results.txt 2006-03-09 00:00:06.0 
+
@@ -1,17 +1,17 @@
-Build status as of Wed Mar  8 00:00:02 2006
+Build status as of Thu Mar  9 00:00:01 2006
 
 Build counts:
 Tree Total  Broken Panic 
-ccache   8  3  0 
-distcc   8  2  0 
+ccache   9  3  0 
+distcc   9  2  0 
 lorikeet-heimdal 30 30 0 
-ppp  15 0  0 
+ppp  16 0  0 
 rsync34 2  0 
 samba2  0  0 
 samba-docs   0  0  0 
-samba4   35 28 3 
-samba_3_034 5  0 
-smb-build24 5  0 
-talloc   8  6  0 
-tdb  29 3  0 
+samba4   36 28 2 
+samba_3_035 7  0 
+smb-build22 5  0 
+talloc   9  6  0 
+tdb  30 3  0 
 


svn commit: samba r14057 - branches/SAMBA_3_0/source branches/SAMBA_3_0/source/script trunk/source

2006-03-08 Thread lmuelle
Author: lmuelle
Date: 2006-03-08 21:46:16 + (Wed, 08 Mar 2006)
New Revision: 14057

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

Log:
Remove generated script/gen-8bit-gap.sh while calling rule realclean.

Ignore script/gen-8bit-gap.sh in branches/SAMBA_3_0/source/script as we
already do in trunk.

Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/script/
   trunk/source/Makefile.in


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-03-08 21:42:12 UTC (rev 
14056)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-03-08 21:46:16 UTC (rev 
14057)
@@ -1650,7 +1650,7 @@
ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
 
 realclean: clean delheaders
-   -rm -f config.log bin/.dummy script/findsmb
+   -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh
-rm -f script/installbin.sh script/uninstallbin.sh
 
 distclean: realclean


Property changes on: branches/SAMBA_3_0/source/script
___
Name: svn:ignore
   - findsmb
installbin.sh
uninstallbin.sh

   + findsmb
gen-8bit-gap.sh
installbin.sh
uninstallbin.sh


Modified: trunk/source/Makefile.in
===
--- trunk/source/Makefile.in2006-03-08 21:42:12 UTC (rev 14056)
+++ trunk/source/Makefile.in2006-03-08 21:46:16 UTC (rev 14057)
@@ -1686,7 +1686,7 @@
ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
 
 realclean: clean delheaders
-   -rm -f config.log bin/.dummy script/findsmb
+   -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh
-rm -f script/installbin.sh script/uninstallbin.sh
 
 distclean: realclean



svn commit: samba r14056 - branches/SAMBA_3_0/source branches/SAMBA_3_0/source/script trunk/source trunk/source/script

2006-03-08 Thread lmuelle
Author: lmuelle
Date: 2006-03-08 21:42:12 + (Wed, 08 Mar 2006)
New Revision: 14056

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

Log:
Also install the mount.smbfs sym link to rootsbindir.  Therfore we have
to substitute rootsbindir in {,un}installbin.sh.in.

Pass $prefix as third arg to installbin/ uninstallbin as rootsbindir by
default is $prefix/sbin.

Added:
   branches/SAMBA_3_0/source/script/installbin.sh.in
   branches/SAMBA_3_0/source/script/uninstallbin.sh.in
   trunk/source/script/installbin.sh.in
   trunk/source/script/uninstallbin.sh.in
Removed:
   branches/SAMBA_3_0/source/script/installbin.sh
   branches/SAMBA_3_0/source/script/uninstallbin.sh
   trunk/source/script/installbin.sh
   trunk/source/script/uninstallbin.sh
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/script/
   trunk/source/Makefile.in
   trunk/source/configure.in
   trunk/source/script/


Changeset:
Sorry, the patch is too large (540 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14056


svn commit: samba r14055 - in branches/SAMBA_4_0/source/librpc/idl: .

2006-03-08 Thread gd
Author: gd
Date: 2006-03-08 21:36:20 + (Wed, 08 Mar 2006)
New Revision: 14055

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

Log:
merge from samba3. add ACB_NO_AUTH_DATA_REQD, this has been verified
although not automatically tested in smbtorture right now.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/samr.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/samr.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/samr.idl   2006-03-08 21:33:06 UTC 
(rev 14054)
+++ branches/SAMBA_4_0/source/librpc/idl/samr.idl   2006-03-08 21:36:20 UTC 
(rev 14055)
@@ -37,7 +37,8 @@
ACB_NOT_DELEGATED   = 0x4000,  /* 1 = Not 
delegated */
ACB_USE_DES_KEY_ONLY= 0x8000,  /* 1 = Use DES 
key only */
ACB_DONT_REQUIRE_PREAUTH= 0x0001,  /* 1 = Preauth 
not required */
-   ACB_PW_EXPIRED  = 0x0002   /* 1 = Password 
Expired */
+   ACB_PW_EXPIRED  = 0x0002,  /* 1 = Password 
Expired */
+   ACB_NO_AUTH_DATA_REQD   = 0x0008   /* 1 = No 
authorization data required */
} samr_AcctFlags;
 
/**/



svn commit: samba r14054 - in branches/SAMBA_4_0/source/include: .

2006-03-08 Thread gd
Author: gd
Date: 2006-03-08 21:33:06 + (Wed, 08 Mar 2006)
New Revision: 14054

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

Log:
merge from samba3, fillout more userAccountControl bits.

Guenther

Modified:
   branches/SAMBA_4_0/source/include/ads.h


Changeset:
Modified: branches/SAMBA_4_0/source/include/ads.h
===
--- branches/SAMBA_4_0/source/include/ads.h 2006-03-08 21:29:49 UTC (rev 
14053)
+++ branches/SAMBA_4_0/source/include/ads.h 2006-03-08 21:33:06 UTC (rev 
14054)
@@ -77,9 +77,9 @@
 #define UF_NOT_DELEGATED   0x0010
 #define UF_USE_DES_KEY_ONLY0x0020
 #define UF_DONT_REQUIRE_PREAUTH0x0040
-#define UF_UNUSED_50x0080
+#define UF_PASSWORD_EXPIRED0x0080
 
-#define UF_UNUSED_60x0100
+#define UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION 0x0100
 #define UF_NO_AUTH_DATA_REQUIRED0x0200
 #define UF_UNUSED_80x0400
 #define UF_UNUSED_90x0800



svn commit: samba r14053 - branches/SAMBA_3_0/source/utils trunk/source/utils

2006-03-08 Thread jmcd
Author: jmcd
Date: 2006-03-08 21:29:49 + (Wed, 08 Mar 2006)
New Revision: 14053

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

Log:
Implement Simo's suggestion: don't use /dev/null for a 'bad' path for
users/workstations

Modified:
   branches/SAMBA_3_0/source/utils/net_rpc_samsync.c
   trunk/source/utils/net_rpc_samsync.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c
===
--- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c   2006-03-08 21:20:43 UTC 
(rev 14052)
+++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c   2006-03-08 21:29:49 UTC 
(rev 14053)
@@ -1158,7 +1158,7 @@
fprintf(add_fd, "gidNumber: 514\n");
fprintf(add_fd, "uid: nobody\n");
fprintf(add_fd, "uidNumber: 999\n");
-   fprintf(add_fd, "homeDirectory: /dev/null\n");
+   fprintf(add_fd, "homeDirectory: /nobodyshomedir\n");
fprintf(add_fd, "sambaPwdLastSet: 0\n");
fprintf(add_fd, "sambaLogonTime: 0\n");
fprintf(add_fd, "sambaLogoffTime: 2147483647\n");
@@ -1472,7 +1472,7 @@
if (!*homedir) {
pstr_sprintf(homedir, "/home/%s", username);
} else {
-   pstr_sprintf(homedir, "/dev/null");
+   pstr_sprintf(homedir, "/nobodyshomedir");
}
}   
 

Modified: trunk/source/utils/net_rpc_samsync.c
===
--- trunk/source/utils/net_rpc_samsync.c2006-03-08 21:20:43 UTC (rev 
14052)
+++ trunk/source/utils/net_rpc_samsync.c2006-03-08 21:29:49 UTC (rev 
14053)
@@ -1158,7 +1158,7 @@
fprintf(add_fd, "gidNumber: 514\n");
fprintf(add_fd, "uid: nobody\n");
fprintf(add_fd, "uidNumber: 999\n");
-   fprintf(add_fd, "homeDirectory: /dev/null\n");
+   fprintf(add_fd, "homeDirectory: /nobodyshomedir\n");
fprintf(add_fd, "sambaPwdLastSet: 0\n");
fprintf(add_fd, "sambaLogonTime: 0\n");
fprintf(add_fd, "sambaLogoffTime: 2147483647\n");
@@ -1472,7 +1472,7 @@
if (!*homedir) {
pstr_sprintf(homedir, "/home/%s", username);
} else {
-   pstr_sprintf(homedir, "/dev/null");
+   pstr_sprintf(homedir, "/nobodyshomedir");
}
}   
 



svn commit: samba r14052 - branches/SAMBA_3_0/source branches/SAMBA_3_0/source/script trunk/source trunk/source/script

2006-03-08 Thread lmuelle
Author: lmuelle
Date: 2006-03-08 21:20:43 + (Wed, 08 Mar 2006)
New Revision: 14052

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

Log:
Remove BASEDIR use in the Makefile.  [EMAIL PROTECTED]@ till now.
I suggest to stay with ^BASEDIR= @[EMAIL PROTECTED] for at least the next 
release
to give external projects - like samba-vscan project - time to adopt
this change.

BASEDIR is non of the default autoconf variables.  prefix is.

Jerry1: If possible please announce this with the next release.  I'll
self reply to technical.

Jerry2: This does not break your makepkg stuff as you set BASEDIR
_not_ from the Makefile.

Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/script/installmodules.sh
   branches/SAMBA_3_0/source/script/uninstallmodules.sh
   trunk/source/Makefile.in
   trunk/source/script/installmodules.sh
   trunk/source/script/uninstallmodules.sh


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-03-08 21:10:20 UTC (rev 
14051)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-03-08 21:20:43 UTC (rev 
14052)
@@ -1402,7 +1402,7 @@
 # is not used
 
 installdirs:
-   @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) 
$(BASEDIR) $(BINDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(PRIVATEDIR) $(PIDDIR) 
$(LOCKDIR) $(MANDIR)
+   @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) 
$(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(PRIVATEDIR) $(PIDDIR) 
$(LOCKDIR) $(MANDIR)
 
 installservers: all installdirs
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) 
$(SBINDIR) $(SBIN_PROGS)
@@ -1417,12 +1417,12 @@
 # Some symlinks are required for the 'probing' of modules. 
 # This mechanism should go at some point..
 installmodules: modules installdirs
-   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(BASEDIR) $(VFSLIBDIR) $(VFS_MODULES)
-   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(BASEDIR) $(PDBLIBDIR) $(PDB_MODULES)
-   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(BASEDIR) $(RPCLIBDIR) $(RPC_MODULES)
-   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(BASEDIR) $(IDMAPLIBDIR) $(IDMAP_MODULES)
-   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(BASEDIR) $(CHARSETLIBDIR) $(CHARSET_MODULES)
-   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(BASEDIR) $(AUTHLIBDIR) $(AUTH_MODULES)
+   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(prefix) $(VFSLIBDIR) $(VFS_MODULES)
+   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(prefix) $(PDBLIBDIR) $(PDB_MODULES)
+   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(prefix) $(RPCLIBDIR) $(RPC_MODULES)
+   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
+   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
+   @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) 
$(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
@$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) [EMAIL 
PROTECTED]@ [EMAIL PROTECTED]@
@$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) 
[EMAIL PROTECTED]@ [EMAIL PROTECTED]@
@$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) 
[EMAIL PROTECTED]@ [EMAIL PROTECTED]@
@@ -1498,7 +1498,7 @@
 
 showlayout:
@echo "Samba will be installed into:"
-   @echo "  basedir: $(BASEDIR)"
+   @echo "  prefix:  $(prefix)"
@echo "  bindir:  $(BINDIR)"
@echo "  sbindir: $(SBINDIR)"
@echo "  libdir:  $(LIBDIR)"
@@ -1526,12 +1526,12 @@
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR) 
$(ROOTSBINDIR) @CIFSMOUNT_PROGS@
 
 uninstallmodules:
-   @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) 
$(DESTDIR) $(BASEDIR) $(VFSLIBDIR) $(VFS_MODULES)
-   @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) 
$(DESTDIR) $(BASEDIR) $(PDBLIBDIR) $(PDB_MODULES)
-   @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) 
$(DESTDIR) $(BASEDIR) $(RPCLIBDIR) $(RPC_MODULES)
-   @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) 
$(DESTDIR) $(BASEDIR) $(IDMAPLIBDIR) $(IDMAP_MODULES)
-   @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) 
$(DESTDIR) $(BASEDIR) $(CHARSETLIBDIR) $(CHARSET_MODULES)
-   @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) 
$(DESTDIR) $(BASEDIR) $(AUTHLIBDIR) $(AUTH_MODULES)
+   @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPER

svn commit: samba r14051 - branches/SAMBA_3_0/source/include trunk/source/include

2006-03-08 Thread gd
Author: gd
Date: 2006-03-08 21:10:20 + (Wed, 08 Mar 2006)
New Revision: 14051

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

Log:
Add remaining (documented) userAccountControl bits, thanks to Luke
Howard for pointing this out.

Guenther

Modified:
   branches/SAMBA_3_0/source/include/ads.h
   trunk/source/include/ads.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/ads.h
===
--- branches/SAMBA_3_0/source/include/ads.h 2006-03-08 21:05:32 UTC (rev 
14050)
+++ branches/SAMBA_3_0/source/include/ads.h 2006-03-08 21:10:20 UTC (rev 
14051)
@@ -135,9 +135,9 @@
 #define UF_NOT_DELEGATED   0x0010
 #define UF_USE_DES_KEY_ONLY0x0020
 #define UF_DONT_REQUIRE_PREAUTH0x0040
-#define UF_UNUSED_50x0080
+#define UF_PASSWORD_EXPIRED0x0080
 
-#define UF_UNUSED_60x0100
+#define UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION 0x0100
 #define UF_NO_AUTH_DATA_REQUIRED   0x0200
 #define UF_UNUSED_80x0400
 #define UF_UNUSED_90x0800

Modified: trunk/source/include/ads.h
===
--- trunk/source/include/ads.h  2006-03-08 21:05:32 UTC (rev 14050)
+++ trunk/source/include/ads.h  2006-03-08 21:10:20 UTC (rev 14051)
@@ -135,9 +135,9 @@
 #define UF_NOT_DELEGATED   0x0010
 #define UF_USE_DES_KEY_ONLY0x0020
 #define UF_DONT_REQUIRE_PREAUTH0x0040
-#define UF_UNUSED_50x0080
+#define UF_PASSWORD_EXPIRED0x0080
 
-#define UF_UNUSED_60x0100
+#define UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION 0x0100
 #define UF_NO_AUTH_DATA_REQUIRED   0x0200
 #define UF_UNUSED_80x0400
 #define UF_UNUSED_90x0800



svn commit: samba r14050 - branches/SAMBA_3_0/source/include trunk/source/include

2006-03-08 Thread gd
Author: gd
Date: 2006-03-08 21:05:32 + (Wed, 08 Mar 2006)
New Revision: 14050

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

Log:
Add the ACB_PWEXPIRED bit abartlet has found.

Guenther

Modified:
   branches/SAMBA_3_0/source/include/smb.h
   trunk/source/include/smb.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/smb.h
===
--- branches/SAMBA_3_0/source/include/smb.h 2006-03-08 20:57:41 UTC (rev 
14049)
+++ branches/SAMBA_3_0/source/include/smb.h 2006-03-08 21:05:32 UTC (rev 
14050)
@@ -243,6 +243,7 @@
 #define ACB_NOT_DELEGATED  0x4000  /* 1 = Not delegated */
 #define ACB_USE_DES_KEY_ONLY   0x8000  /* 1 = Use DES key only */
 #define ACB_DONT_REQUIRE_PREAUTH   0x0001  /* 1 = Preauth not required 
*/
+#define ACB_PWEXPIRED  0x0002  /* 1 = Password is expired 
*/
 #define ACB_NO_AUTH_DATA_REQD  0x0008  /* 1 = No authorization 
data required */
 
 #define MAX_HOURS_LEN 32

Modified: trunk/source/include/smb.h
===
--- trunk/source/include/smb.h  2006-03-08 20:57:41 UTC (rev 14049)
+++ trunk/source/include/smb.h  2006-03-08 21:05:32 UTC (rev 14050)
@@ -245,6 +245,7 @@
 #define ACB_NOT_DELEGATED  0x4000  /* 1 = Not delegated */
 #define ACB_USE_DES_KEY_ONLY   0x8000  /* 1 = Use DES key only */
 #define ACB_DONT_REQUIRE_PREAUTH   0x0001  /* 1 = Preauth not required 
*/
+#define ACB_PWEXPIRED  0x0002  /* 1 = Password is expired 
*/
 #define ACB_NO_AUTH_DATA_REQD  0x0008  /* 1 = No authorization 
data required */
 
 #define MAX_HOURS_LEN 32



svn commit: samba r14049 - branches/SAMBA_3_0/source/include trunk/source/include

2006-03-08 Thread gd
Author: gd
Date: 2006-03-08 20:57:41 + (Wed, 08 Mar 2006)
New Revision: 14049

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

Log:
Found some more MSV1_0 bits and their behaviour; 
just for documentation purpose.

Guenther

Modified:
   branches/SAMBA_3_0/source/include/rpc_netlogon.h
   trunk/source/include/rpc_netlogon.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/rpc_netlogon.h
===
--- branches/SAMBA_3_0/source/include/rpc_netlogon.h2006-03-08 20:07:31 UTC 
(rev 14048)
+++ branches/SAMBA_3_0/source/include/rpc_netlogon.h2006-03-08 20:57:41 UTC 
(rev 14049)
@@ -108,9 +108,21 @@
 #define SE_GROUP_RESOURCE  0x2000
 
 /* Flags for controlling the behaviour of a particular logon */
-#define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT  ( 0x020 )
-#define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT ( 0x800 )
 
+/* sets LOGON_SERVER_TRUST_ACCOUNT user_flag */
+#define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT  0x0020
+#define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT 0x0800
+
+/* updates the "logon time" on network logon */
+#define MSV1_0_UPDATE_LOGON_STATISTICS 0x0004
+
+/* returns the user parameters in the driveletter */
+#define MSV1_0_RETURN_USER_PARAMETERS  0x0008
+
+/* returns the profilepath in the driveletter and 
+ * sets LOGON_PROFILE_PATH_RETURNED user_flag */
+#define MSV1_0_RETURN_PROFILE_PATH 0x0200
+
 #if 0
 /* I think this is correct - it's what gets parsed on the wire. JRA. */
 /* NET_USER_INFO_2 */

Modified: trunk/source/include/rpc_netlogon.h
===
--- trunk/source/include/rpc_netlogon.h 2006-03-08 20:07:31 UTC (rev 14048)
+++ trunk/source/include/rpc_netlogon.h 2006-03-08 20:57:41 UTC (rev 14049)
@@ -108,9 +108,21 @@
 #define SE_GROUP_RESOURCE  0x2000
 
 /* Flags for controlling the behaviour of a particular logon */
-#define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT  ( 0x020 )
-#define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT ( 0x800 )
 
+/* sets LOGON_SERVER_TRUST_ACCOUNT user_flag */
+#define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT  0x0020
+#define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT 0x0800
+
+/* updates the "logon time" on network logon */
+#define MSV1_0_UPDATE_LOGON_STATISTICS 0x0004
+
+/* returns the user parameters in the driveletter */
+#define MSV1_0_RETURN_USER_PARAMETERS  0x0008
+
+/* returns the profilepath in the driveletter and 
+ * sets LOGON_PROFILE_PATH_RETURNED user_flag */
+#define MSV1_0_RETURN_PROFILE_PATH 0x0200
+
 #if 0
 /* I think this is correct - it's what gets parsed on the wire. JRA. */
 /* NET_USER_INFO_2 */



svn commit: samba-web r926 - in trunk/news/calendar: .

2006-03-08 Thread deryck
Author: deryck
Date: 2006-03-08 20:45:21 + (Wed, 08 Mar 2006)
New Revision: 926

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

Log:
Adding Tim's Samba tutorial at LW Sydney 
to the Team calendar.

deryck
Added:
   trunk/news/calendar/lw_sydney_06.txt
Modified:
   trunk/news/calendar/index.html
   trunk/news/calendar/showDate.js


Changeset:
Modified: trunk/news/calendar/index.html
===
--- trunk/news/calendar/index.html  2006-03-07 17:07:26 UTC (rev 925)
+++ trunk/news/calendar/index.html  2006-03-08 20:45:21 UTC (rev 926)
@@ -227,7 +227,7 @@
26
27
28
-   29
+   29
30
31


Added: trunk/news/calendar/lw_sydney_06.txt
===
--- trunk/news/calendar/lw_sydney_06.txt2006-03-07 17:07:26 UTC (rev 
925)
+++ trunk/news/calendar/lw_sydney_06.txt2006-03-08 20:45:21 UTC (rev 
926)
@@ -0,0 +1,9 @@
+29 March 2006, LinuxWorld Sydney
+
+Samba Team member Tim Potter will be giving a tutorial on
+"Advanced Samba Administration" at the LinuxWorld Conference
+and Expo in Sydney, Australia.  The tutorial runs 9:00am-12:00pm,
+March 29.
+
+See http://www.linuxworldexpo.com.au/conf_detail.asp?ConferenceID=2604
+for more info.
\ No newline at end of file

Modified: trunk/news/calendar/showDate.js
===
--- trunk/news/calendar/showDate.js 2006-03-07 17:07:26 UTC (rev 925)
+++ trunk/news/calendar/showDate.js 2006-03-08 20:45:21 UTC (rev 926)
@@ -7,6 +7,7 @@
 allEvents[5] = 'May 30-June 3, Boston, MATeam member Jerry Carter 
will be teaching courses on  LDAP and Ethereal at the 2006 USENIX Annual 
Technical Conference.  For more info, see http://www.usenix.org/events/usenix06/";>http://www.usenix.org/events/usenix06/.';
 allEvents[6] = 'March 9-10, Hannover, GermanyVolker Lendecke will be 
giving a Samba4 status update twice during CeBIT.  Info on the March 9 talk is 
available at http://www.ix-konferenz.de/stundenplan.php?konferenzid=7&st=Programm%FCbersicht";>here.
 For more on the March 10 talk, see http://www.linux-events.de/LinuxPark_2006/LinuxForum/vortraege.html";>this 
events page.For more on CeBIT, see http://www.cebit.de/";>http://www.cebit.de/.';
 allEvents[7] = '21-23 March, Durham, UKSamba Team member Jerry 
Carter will be leading a Samba tutorial at UKUUG\'s annual Large Installation 
Systems Administration (LISA) conference.  The tutorial will be a full-day 
class for those currently managing Samba servers or planning to deploy new 
servers this year.For more info, see http://www.ukuug.org/events/spring2006/";>http://www.ukuug.org/events/spring2006/.March 23, Osnabrück, GermanySamba Team member Volker Lendecke 
will be giving a Samba 3 status update at the German Unix User Group meeting.  
For more on Volker\'s talk, see http://www.guug.de/veranstaltungen/ffg2006/abstracts.html#3_5_1";>this 
overview.For more on the conference, see http://www.guug.de/veranstaltungen/ffg2006/";>http://www.guug.de/veranstaltungen/ffg2006/.';
+allEvents[8] = '29 March 2006, LinuxWorld SydneySamba Team member 
Tim Potter will be giving a tutorial on "Advanced Samba Administration" at the 
LinuxWorld Conference and Expo in Sydney, Australia.  The tutorial runs 
9:00am-12:00pm, March 29.See http://www.linuxworldexpo.com.au/conf_detail.asp?ConferenceID=2604";>the 
tutorial overview for more info.';
 
 function showDate(thisDate) {
 document.getElementById('events').innerHTML = allEvents[thisDate]



svn commit: samba r14048 - in trunk/source/rpc_parse: .

2006-03-08 Thread jra
Author: jra
Date: 2006-03-08 20:07:31 + (Wed, 08 Mar 2006)
New Revision: 14048

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

Log:
Coverity fix #17. Ensure srv_name and info cannot
be zero before deref.
Jeremy.

Modified:
   trunk/source/rpc_parse/parse_spoolss.c


Changeset:
Modified: trunk/source/rpc_parse/parse_spoolss.c
===
--- trunk/source/rpc_parse/parse_spoolss.c  2006-03-08 20:07:24 UTC (rev 
14047)
+++ trunk/source/rpc_parse/parse_spoolss.c  2006-03-08 20:07:31 UTC (rev 
14048)
@@ -5061,6 +5061,10 @@
 {
DEBUG(5,("make_spoolss_q_addprinterdriver\n"));

+   if (!srv_name || !info) {
+   return False;
+   }
+
q_u->server_name_ptr = (srv_name!=NULL)?1:0;
init_unistr2(&q_u->server_name, srv_name, UNI_STR_TERMINATE);




svn commit: samba r14047 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-03-08 Thread jra
Author: jra
Date: 2006-03-08 20:07:24 + (Wed, 08 Mar 2006)
New Revision: 14047

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

Log:
Coverity fix #17. Ensure srv_name and info cannot
be zero before deref.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c 2006-03-08 20:02:57 UTC 
(rev 14046)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c 2006-03-08 20:07:24 UTC 
(rev 14047)
@@ -5061,6 +5061,10 @@
 {
DEBUG(5,("make_spoolss_q_addprinterdriver\n"));

+   if (!srv_name || !info) {
+   return False;
+   }
+
q_u->server_name_ptr = (srv_name!=NULL)?1:0;
init_unistr2(&q_u->server_name, srv_name, UNI_STR_TERMINATE);




svn commit: samba r14046 - in trunk/source/rpc_parse: .

2006-03-08 Thread jra
Author: jra
Date: 2006-03-08 20:02:57 + (Wed, 08 Mar 2006)
New Revision: 14046

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

Log:
Coverity fix #14. Ensure if len is set buf != NULL.
Jeremy.

Modified:
   trunk/source/rpc_parse/parse_misc.c


Changeset:
Modified: trunk/source/rpc_parse/parse_misc.c
===
--- trunk/source/rpc_parse/parse_misc.c 2006-03-08 20:02:50 UTC (rev 14045)
+++ trunk/source/rpc_parse/parse_misc.c 2006-03-08 20:02:57 UTC (rev 14046)
@@ -762,6 +762,11 @@
/* set up string lengths. */
SMB_ASSERT(max_len >= str_len);
 
+   /* Ensure buf is valid if str_len was set. Coverity check. */
+   if (str_len && !buf) {
+   return;
+   }
+
str->str_max_len = max_len;
str->offset = 0;
str->str_str_len = str_len;



svn commit: samba r14045 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-03-08 Thread jra
Author: jra
Date: 2006-03-08 20:02:50 + (Wed, 08 Mar 2006)
New Revision: 14045

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

Log:
Coverity fix #14. Ensure if len is set buf != NULL.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_misc.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_misc.c2006-03-08 17:50:57 UTC 
(rev 14044)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_misc.c2006-03-08 20:02:50 UTC 
(rev 14045)
@@ -762,6 +762,11 @@
/* set up string lengths. */
SMB_ASSERT(max_len >= str_len);
 
+   /* Ensure buf is valid if str_len was set. Coverity check. */
+   if (str_len && !buf) {
+   return;
+   }
+
str->str_max_len = max_len;
str->offset = 0;
str->str_str_len = str_len;



svn commit: samba r14044 - in trunk/source: rpc_parse smbd

2006-03-08 Thread jra
Author: jra
Date: 2006-03-08 17:50:57 + (Wed, 08 Mar 2006)
New Revision: 14044

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

Log:
After discussion with Jerry revert part of the
Coverity null-ref patch - put prs_rpcbuffer_p
back to the way it was (with an additional
coverity paranoia check) - move the real test
into rpcbuf_alloc_size instead.
Jeremy.

Modified:
   trunk/source/rpc_parse/parse_buffer.c
   trunk/source/smbd/trans2.c


Changeset:
Modified: trunk/source/rpc_parse/parse_buffer.c
===
--- trunk/source/rpc_parse/parse_buffer.c   2006-03-08 17:50:44 UTC (rev 
14043)
+++ trunk/source/rpc_parse/parse_buffer.c   2006-03-08 17:50:57 UTC (rev 
14044)
@@ -108,37 +108,22 @@
 
data_p = *buffer ? 0xf000baaa : 0;
 
-   if ( !prs_uint32("ptr", ps, depth, &data_p )) {
+   if ( !prs_uint32("ptr", ps, depth, &data_p ))
return False;
-   }
 
-   /* We must always return a valid buffer pointer even if the
-  client didn't send one - just leave it initialized to null. */
-   if ( UNMARSHALLING(ps) ) {
-   if ( !(*buffer = PRS_ALLOC_MEM(ps, RPC_BUFFER, 1)) ) {
-   return False;
-   }
-   }
-
/* we're done if there is no data */
 
-   if (!data_p) {
-   if (UNMARSHALLING(ps)) {
-   RPC_BUFFER *pbuffer = *buffer;
-   /* On unmarshalling we must return a valid,
-  but zero size value RPC_BUFFER. */
-   pbuffer->size = 0;
-   pbuffer->string_at_end = 0;
-   if (!prs_init(&pbuffer->prs, 0, 
prs_get_mem_context(ps), UNMARSHALL)) {
-   return False;
-   }
-   }
+   if ( !data_p )
return True;
-   }
 
-   /* Coverity paranoia. Buffer must be valid. */
-   if (!*buffer) {
-   return False;
+   if ( UNMARSHALLING(ps) ) {
+   if ( !(*buffer = PRS_ALLOC_MEM(ps, RPC_BUFFER, 1)) )
+   return False;
+   } else {
+   /* Marshalling case. - coverity paranoia - should already be ok 
if data_p != 0 */
+   if (!*buffer) {
+   return True;
+   }
}
 
return prs_rpcbuffer( desc, ps, depth, *buffer);
@@ -158,7 +143,11 @@

if ( buffer_size == 0x0 )
return True;
-   
+
+   if (!buffer) {
+   return False;
+   }
+
ps= &buffer->prs;
 
/* damn, I'm doing the reverse operation of prs_grow() :) */

Modified: trunk/source/smbd/trans2.c
===
--- trunk/source/smbd/trans2.c  2006-03-08 17:50:44 UTC (rev 14043)
+++ trunk/source/smbd/trans2.c  2006-03-08 17:50:57 UTC (rev 14044)
@@ -2778,7 +2778,7 @@
char *fullpathname;
char *base_name;
char *p;
-   char *lock_data;
+   char *lock_data = NULL;
SMB_OFF_T pos = 0;
BOOL bad_path = False;
BOOL delete_pending = False;



svn commit: samba r14043 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-03-08 Thread jra
Author: jra
Date: 2006-03-08 17:50:44 + (Wed, 08 Mar 2006)
New Revision: 14043

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

Log:
After discussion with Jerry revert part of the
Coverity null-ref patch - put prs_rpcbuffer_p
back to the way it was (with an additional
coverity paranoia check) - move the real test
into rpcbuf_alloc_size instead.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_buffer.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_buffer.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_buffer.c  2006-03-08 15:18:14 UTC 
(rev 14042)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_buffer.c  2006-03-08 17:50:44 UTC 
(rev 14043)
@@ -108,37 +108,22 @@
 
data_p = *buffer ? 0xf000baaa : 0;
 
-   if ( !prs_uint32("ptr", ps, depth, &data_p )) {
+   if ( !prs_uint32("ptr", ps, depth, &data_p ))
return False;
-   }
 
-   /* We must always return a valid buffer pointer even if the
-  client didn't send one - just leave it initialized to null. */
-   if ( UNMARSHALLING(ps) ) {
-   if ( !(*buffer = PRS_ALLOC_MEM(ps, RPC_BUFFER, 1)) ) {
-   return False;
-   }
-   }
-
/* we're done if there is no data */
 
-   if (!data_p) {
-   if (UNMARSHALLING(ps)) {
-   RPC_BUFFER *pbuffer = *buffer;
-   /* On unmarshalling we must return a valid,
-  but zero size value RPC_BUFFER. */
-   pbuffer->size = 0;
-   pbuffer->string_at_end = 0;
-   if (!prs_init(&pbuffer->prs, 0, 
prs_get_mem_context(ps), UNMARSHALL)) {
-   return False;
-   }
-   }
+   if ( !data_p )
return True;
-   }
 
-   /* Coverity paranoia. Buffer must be valid. */
-   if (!*buffer) {
-   return False;
+   if ( UNMARSHALLING(ps) ) {
+   if ( !(*buffer = PRS_ALLOC_MEM(ps, RPC_BUFFER, 1)) )
+   return False;
+   } else {
+   /* Marshalling case. - coverity paranoia - should already be ok 
if data_p != 0 */
+   if (!*buffer) {
+   return True;
+   }
}
 
return prs_rpcbuffer( desc, ps, depth, *buffer);
@@ -158,7 +143,11 @@

if ( buffer_size == 0x0 )
return True;
-   
+
+   if (!buffer) {
+   return False;
+   }
+
ps= &buffer->prs;
 
/* damn, I'm doing the reverse operation of prs_grow() :) */



svn commit: samba r14042 - branches/SAMBA_3_0/source/auth trunk/source/auth

2006-03-08 Thread jerry
Author: jerry
Date: 2006-03-08 15:18:14 + (Wed, 08 Mar 2006)
New Revision: 14042

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

Log:
check that create_local_nt_token() succeeds before dereferncing the 
NT_USER_TOKEN*
Modified:
   branches/SAMBA_3_0/source/auth/auth_util.c
   trunk/source/auth/auth_util.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/auth_util.c
===
--- branches/SAMBA_3_0/source/auth/auth_util.c  2006-03-08 15:14:59 UTC (rev 
14041)
+++ branches/SAMBA_3_0/source/auth/auth_util.c  2006-03-08 15:18:14 UTC (rev 
14042)
@@ -821,6 +821,10 @@
pdb_get_group_sid(server_info->sam_account),
server_info->guest,
server_info->num_sids, server_info->sids);
+
+   if ( !server_info->ptok ) {
+   return NT_STATUS_NO_SUCH_USER;
+   }

/* Convert the SIDs to gids. */
 

Modified: trunk/source/auth/auth_util.c
===
--- trunk/source/auth/auth_util.c   2006-03-08 15:14:59 UTC (rev 14041)
+++ trunk/source/auth/auth_util.c   2006-03-08 15:18:14 UTC (rev 14042)
@@ -821,6 +821,10 @@
pdb_get_group_sid(server_info->sam_account),
server_info->guest,
server_info->num_sids, server_info->sids);
+
+   if ( !server_info->ptok ) {
+   return NT_STATUS_NO_SUCH_USER;
+   }

/* Convert the SIDs to gids. */
 



svn commit: samba r14041 - in branches/SAMBA_4_0/source/smb_server/smb: .

2006-03-08 Thread metze
Author: metze
Date: 2006-03-08 15:14:59 + (Wed, 08 Mar 2006)
New Revision: 14041

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

Log:
be a bit less verbose

metze
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/negprot.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/negprot.c
===
--- branches/SAMBA_4_0/source/smb_server/smb/negprot.c  2006-03-08 15:02:04 UTC 
(rev 14040)
+++ branches/SAMBA_4_0/source/smb_server/smb/negprot.c  2006-03-08 15:14:59 UTC 
(rev 14041)
@@ -500,7 +500,7 @@
p += len;
if (len == 0 || !protos[protos_count]) break;
 
-   DEBUG(3,("Requested protocol [%d][%s]\n", protos_count, 
protos[protos_count]));
+   DEBUG(5,("Requested protocol [%d][%s]\n", protos_count, 
protos[protos_count]));
protos_count++;
}
 



svn commit: samba r14040 - in branches/SAMBA_4_0/source/torture: .

2006-03-08 Thread metze
Author: metze
Date: 2006-03-08 15:02:04 + (Wed, 08 Mar 2006)
New Revision: 14040

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

Log:
report errors better

metze
Modified:
   branches/SAMBA_4_0/source/torture/torture.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/torture.c
===
--- branches/SAMBA_4_0/source/torture/torture.c 2006-03-08 14:58:57 UTC (rev 
14039)
+++ branches/SAMBA_4_0/source/torture/torture.c 2006-03-08 15:02:04 UTC (rev 
14040)
@@ -931,10 +931,12 @@
 
printf("Opening secondary connection\n");
if (!torture_open_connection(&cli2)) {
+   printf("Failed to open secondary connection\n");
correct = False;
}
 
if (!torture_close_connection(cli2)) {
+   printf("Failed to close secondary connection\n");
correct = False;
}
 



svn commit: samba r14039 - in branches/SAMBA_4_0/source/torture: .

2006-03-08 Thread metze
Author: metze
Date: 2006-03-08 14:58:57 + (Wed, 08 Mar 2006)
New Revision: 14039

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

Log:
as samba4 drops the connection on multiple negprot requests
make the BASE-NEGNOWAIT tests more robust.

was it correct that the important thing to test in this
test is that the 2nd connection works fine?

metze
Modified:
   branches/SAMBA_4_0/source/torture/torture.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/torture.c
===
--- branches/SAMBA_4_0/source/torture/torture.c 2006-03-08 12:31:57 UTC (rev 
14038)
+++ branches/SAMBA_4_0/source/torture/torture.c 2006-03-08 14:58:57 UTC (rev 
14039)
@@ -918,18 +918,19 @@
req = smb_raw_negotiate_send(cli->transport, PROTOCOL_NT1);
event_loop_once(cli->transport->socket->event.ctx);
if (req->state == SMBCLI_REQUEST_ERROR) {
-   printf("Failed to fill pipe - %s\n", 
nt_errstr(req->status));
-   torture_close_connection(cli);
-   return correct;
+   if (i > 0) {
+   printf("Failed to fill pipe packet[%d] - %s 
(ignored)\n", i+1, nt_errstr(req->status));
+   break;
+   } else {
+   printf("Failed to fill pipe - %s \n", 
nt_errstr(req->status));
+   torture_close_connection(cli);
+   return False;
+   }
}
}
 
printf("Opening secondary connection\n");
if (!torture_open_connection(&cli2)) {
-   return False;
-   }
-
-   if (!torture_close_connection(cli)) {
correct = False;
}
 
@@ -937,6 +938,8 @@
correct = False;
}
 
+   torture_close_connection(cli);
+
printf("finished negprot nowait test\n");
 
return correct;



svn commit: samba r14038 - in branches/SAMBA_4_0/source: lib/util smbd

2006-03-08 Thread metze
Author: metze
Date: 2006-03-08 12:31:57 + (Wed, 08 Mar 2006)
New Revision: 14038

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

Log:
reopen log files after a SIGHUP

metze
Modified:
   branches/SAMBA_4_0/source/lib/util/debug.c
   branches/SAMBA_4_0/source/smbd/server.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/util/debug.c
===
--- branches/SAMBA_4_0/source/lib/util/debug.c  2006-03-08 11:13:13 UTC (rev 
14037)
+++ branches/SAMBA_4_0/source/lib/util/debug.c  2006-03-08 12:31:57 UTC (rev 
14038)
@@ -47,11 +47,31 @@
const char *prog_name;
 } state;
 
+static BOOL reopen_logs_scheduled;
+static BOOL check_reopen_logs(void)
+{
+   if (state.fd == 0 || reopen_logs_scheduled) {
+   reopen_logs_scheduled = False;
+   reopen_logs();
+   }
+
+   if (state.fd <= 0) return False;
+
+   return True;
+}
+
+_PUBLIC_ void debug_schedule_reopen_logs(void)
+{
+   reopen_logs_scheduled = True;
+}
+
 static void log_timestring(int level, const char *location, const char *func)
 {
char *t = NULL;
char *s = NULL;
 
+   if (!check_reopen_logs()) return;
+
if (state.logtype != DEBUG_FILE) return;
 
t = timestring(NULL, time(NULL));
@@ -87,12 +107,8 @@
va_list ap;
char *s = NULL;
 
-   if (state.fd == 0) {
-   reopen_logs();
-   }
+   if (!check_reopen_logs()) return;
 
-   if (state.fd <= 0) return;
-
va_start(ap, format);
vasprintf(&s, format, ap);
va_end(ap);
@@ -179,9 +195,9 @@
 */ 
 _PUBLIC_ void log_suspicious_usage(const char *from, const char *info)
 {
-   if (debug_handlers.ops.log_suspicious_usage) {
-   debug_handlers.ops.log_suspicious_usage(from, info);
-   }
+   if (!debug_handlers.ops.log_suspicious_usage) return;
+
+   debug_handlers.ops.log_suspicious_usage(from, info);
 }
 
 
@@ -190,9 +206,9 @@
 */ 
 _PUBLIC_ void print_suspicious_usage(const char* from, const char* info)
 {
-   if (debug_handlers.ops.print_suspicious_usage) {
-   debug_handlers.ops.print_suspicious_usage(from, info);
-   }
+   if (!debug_handlers.ops.print_suspicious_usage) return;
+
+   debug_handlers.ops.print_suspicious_usage(from, info);
 }
 
 _PUBLIC_ uint32_t get_task_id(void)
@@ -205,9 +221,11 @@
 
 _PUBLIC_ void log_task_id(void)
 {
-   if (debug_handlers.ops.log_task_id) {
-   debug_handlers.ops.log_task_id(state.fd);
-   }
+   if (!debug_handlers.ops.log_task_id) return;
+
+   if (!check_reopen_logs()) return;
+
+   debug_handlers.ops.log_task_id(state.fd);
 }
 
 /**

Modified: branches/SAMBA_4_0/source/smbd/server.c
===
--- branches/SAMBA_4_0/source/smbd/server.c 2006-03-08 11:13:13 UTC (rev 
14037)
+++ branches/SAMBA_4_0/source/smbd/server.c 2006-03-08 12:31:57 UTC (rev 
14038)
@@ -98,6 +98,11 @@
talloc_free(mem_ctx);
 }
 
+static void sig_hup(int sig)
+{
+   debug_schedule_reopen_logs();
+}
+
 /*
   setup signal masks
 */
@@ -124,9 +129,7 @@
BlockSignals(False, SIGHUP);
BlockSignals(False, SIGTERM);
 
-   /* as we don't handle on this signals yet, we need to ignore them,
-* instead of terminating */
-   CatchSignal(SIGHUP, SIG_IGN);
+   CatchSignal(SIGHUP, sig_hup);
 }
 
 /*



svn commit: samba r14037 - in branches/SAMBA_4_0/source/ntvfs: .

2006-03-08 Thread metze
Author: metze
Date: 2006-03-08 11:13:13 + (Wed, 08 Mar 2006)
New Revision: 14037

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

Log:
add ntvfs_next_notify()

metze
Modified:
   branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c
===
--- branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c   2006-03-08 08:51:19 UTC 
(rev 14036)
+++ branches/SAMBA_4_0/source/ntvfs/ntvfs_interface.c   2006-03-08 11:13:13 UTC 
(rev 14037)
@@ -629,3 +629,15 @@
}
return ntvfs->next->ops->cancel(ntvfs->next, req);
 }
+
+/*
+  change notify request
+*/
+_PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs,
+   struct smbsrv_request *req, struct 
smb_notify *info)
+{
+   if (!ntvfs->next || !ntvfs->next->ops->notify) {
+   return NT_STATUS_NOT_IMPLEMENTED;
+   }
+   return ntvfs->next->ops->notify(ntvfs, req, info);
+}



svn commit: samba r14036 - branches/SAMBA_3_0/source/utils trunk/source/utils

2006-03-08 Thread vlendec
Author: vlendec
Date: 2006-03-08 08:51:19 + (Wed, 08 Mar 2006)
New Revision: 14036

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

Log:
Ok, the last one generated a const warning. Also fix Coverity # 119.

net rpc vampire is ugly

Volker

Modified:
   branches/SAMBA_3_0/source/utils/net_rpc_samsync.c
   trunk/source/utils/net_rpc_samsync.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c
===
--- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c   2006-03-08 08:41:36 UTC 
(rev 14035)
+++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c   2006-03-08 08:51:19 UTC 
(rev 14036)
@@ -305,6 +305,10 @@
(!old_string && new_string) ||\
(old_string && new_string && (strcmp(old_string, new_string) != 
0))
 
+#define STRING_CHANGED_NC(s1,s2) ((s1) && !(s2)) ||\
+   (!(s1) && (s2)) ||\
+   ((s1) && (s2) && (strcmp((s1), (s2)) != 0))
+
 static NTSTATUS sam_account_from_delta(struct samu *account, SAM_ACCOUNT_INFO 
*delta)
 {
const char *old_string, *new_string;
@@ -389,14 +393,15 @@
 
if (delta->hdr_parameters.buffer) {
DATA_BLOB mung;
+   char *newstr;
old_string = pdb_get_munged_dial(account);
mung.length = delta->hdr_parameters.uni_str_len;
mung.data = (uint8 *) delta->uni_parameters.buffer;
-   new_string = (mung.length == 0) ? NULL : 
base64_encode_data_blob(mung);
+   newstr = (mung.length == 0) ? NULL : 
base64_encode_data_blob(mung);
 
-   if (STRING_CHANGED)
-   pdb_set_munged_dial(account, new_string, PDB_CHANGED);
-   SAFE_FREE(new_string);
+   if (STRING_CHANGED_NC(old_string, newstr))
+   pdb_set_munged_dial(account, newstr, PDB_CHANGED);
+   SAFE_FREE(newstr);
}
 
/* User and group sid */
@@ -1086,11 +1091,13 @@
if (idmap_suffix && *idmap_suffix &&
strcmp(idmap_suffix, user_suffix) &&
strcmp(idmap_suffix, suffix)) {
+   char *s;
fprintf(add_fd, "# %s\n", idmap_suffix);
fprintf(add_fd, "dn: %s\n", idmap_suffix);
fprintf(add_fd, "ObjectClass: organizationalUnit\n");
-   fprintf(add_fd, "ou: %s\n", 
-   sstring_sub(lp_ldap_idmap_suffix(), '=', ','));
+   s = sstring_sub(lp_ldap_idmap_suffix(), '=', ',');
+   fprintf(add_fd, "ou: %s\n", s);
+   SAFE_FREE(s);
fprintf(add_fd, "\n");
fflush(add_fd);
}

Modified: trunk/source/utils/net_rpc_samsync.c
===
--- trunk/source/utils/net_rpc_samsync.c2006-03-08 08:41:36 UTC (rev 
14035)
+++ trunk/source/utils/net_rpc_samsync.c2006-03-08 08:51:19 UTC (rev 
14036)
@@ -305,6 +305,10 @@
(!old_string && new_string) ||\
(old_string && new_string && (strcmp(old_string, new_string) != 
0))
 
+#define STRING_CHANGED_NC(s1,s2) ((s1) && !(s2)) ||\
+   (!(s1) && (s2)) ||\
+   ((s1) && (s2) && (strcmp((s1), (s2)) != 0))
+
 static NTSTATUS sam_account_from_delta(struct samu *account, SAM_ACCOUNT_INFO 
*delta)
 {
const char *old_string, *new_string;
@@ -389,14 +393,15 @@
 
if (delta->hdr_parameters.buffer) {
DATA_BLOB mung;
+   char *newstr;
old_string = pdb_get_munged_dial(account);
mung.length = delta->hdr_parameters.uni_str_len;
mung.data = (uint8 *) delta->uni_parameters.buffer;
-   new_string = (mung.length == 0) ? NULL : 
base64_encode_data_blob(mung);
+   newstr = (mung.length == 0) ? NULL : 
base64_encode_data_blob(mung);
 
-   if (STRING_CHANGED)
-   pdb_set_munged_dial(account, new_string, PDB_CHANGED);
-   SAFE_FREE(new_string);
+   if (STRING_CHANGED_NC(old_string, newstr))
+   pdb_set_munged_dial(account, newstr, PDB_CHANGED);
+   SAFE_FREE(newstr);
}
 
/* User and group sid */
@@ -1086,11 +1091,13 @@
if (idmap_suffix && *idmap_suffix &&
strcmp(idmap_suffix, user_suffix) &&
strcmp(idmap_suffix, suffix)) {
+   char *s;
fprintf(add_fd, "# %s\n", idmap_suffix);
fprintf(add_fd, "dn: %s\n", idmap_suffix);
fprintf(add_fd, "ObjectClass: organizationalUnit\n");
-   fprintf(add_fd, "ou: %s\n", 
-   sstring_sub(lp_ldap_idmap_suffix(), '=', ','));
+   s = sstring_sub(lp_ldap_idmap_suffix(), '=', ',');
+   fprintf(add_fd, "ou: %s\n", s);
+   SAFE_FREE(s);

svn commit: samba r14035 - branches/SAMBA_3_0/source/utils trunk/source/utils

2006-03-08 Thread vlendec
Author: vlendec
Date: 2006-03-08 08:41:36 + (Wed, 08 Mar 2006)
New Revision: 14035

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

Log:
Fix Coverity bug # 124
Modified:
   branches/SAMBA_3_0/source/utils/net_rpc_samsync.c
   trunk/source/utils/net_rpc_samsync.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c
===
--- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c   2006-03-08 08:28:42 UTC 
(rev 14034)
+++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c   2006-03-08 08:41:36 UTC 
(rev 14035)
@@ -396,6 +396,7 @@
 
if (STRING_CHANGED)
pdb_set_munged_dial(account, new_string, PDB_CHANGED);
+   SAFE_FREE(new_string);
}
 
/* User and group sid */

Modified: trunk/source/utils/net_rpc_samsync.c
===
--- trunk/source/utils/net_rpc_samsync.c2006-03-08 08:28:42 UTC (rev 
14034)
+++ trunk/source/utils/net_rpc_samsync.c2006-03-08 08:41:36 UTC (rev 
14035)
@@ -396,6 +396,7 @@
 
if (STRING_CHANGED)
pdb_set_munged_dial(account, new_string, PDB_CHANGED);
+   SAFE_FREE(new_string);
}
 
/* User and group sid */



svn commit: samba r14034 - branches/SAMBA_3_0/source/utils trunk/source/utils

2006-03-08 Thread vlendec
Author: vlendec
Date: 2006-03-08 08:28:42 + (Wed, 08 Mar 2006)
New Revision: 14034

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

Log:
Fix Coverity id # 125.

Jeremy, you might want to take a look here.

Volker

Modified:
   branches/SAMBA_3_0/source/utils/net_usershare.c
   trunk/source/utils/net_usershare.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_usershare.c
===
--- branches/SAMBA_3_0/source/utils/net_usershare.c 2006-03-08 08:22:42 UTC 
(rev 14033)
+++ branches/SAMBA_3_0/source/utils/net_usershare.c 2006-03-08 08:28:42 UTC 
(rev 14034)
@@ -348,6 +348,8 @@
comment,
&psd);
 
+   file_lines_free(lines);
+
if (us_err != USERSHARE_OK) {
d_fprintf(stderr, "info_fn: file %s is not a well formed 
usershare file.\n",
basepath );

Modified: trunk/source/utils/net_usershare.c
===
--- trunk/source/utils/net_usershare.c  2006-03-08 08:22:42 UTC (rev 14033)
+++ trunk/source/utils/net_usershare.c  2006-03-08 08:28:42 UTC (rev 14034)
@@ -348,6 +348,8 @@
comment,
&psd);
 
+   file_lines_free(lines);
+
if (us_err != USERSHARE_OK) {
d_fprintf(stderr, "info_fn: file %s is not a well formed 
usershare file.\n",
basepath );



svn commit: samba r14033 - branches/SAMBA_3_0/source/utils trunk/source/utils

2006-03-08 Thread vlendec
Author: vlendec
Date: 2006-03-08 08:22:42 + (Wed, 08 Mar 2006)
New Revision: 14033

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

Log:
Fix Coverity bug # 126
Modified:
   branches/SAMBA_3_0/source/utils/ntlm_auth.c
   trunk/source/utils/ntlm_auth.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/ntlm_auth.c
===
--- branches/SAMBA_3_0/source/utils/ntlm_auth.c 2006-03-08 07:30:43 UTC (rev 
14032)
+++ branches/SAMBA_3_0/source/utils/ntlm_auth.c 2006-03-08 08:22:42 UTC (rev 
14033)
@@ -698,6 +698,7 @@
} else if (NT_STATUS_IS_OK(nt_status)) {
char *reply_base64 = base64_encode_data_blob(reply);
x_fprintf(x_stdout, "AF %s\n", reply_base64);
+   SAFE_FREE(reply_base64);
DEBUG(10, ("NTLMSSP OK!\n"));
if (ntlmssp_state)
ntlmssp_end(&ntlmssp_state);

Modified: trunk/source/utils/ntlm_auth.c
===
--- trunk/source/utils/ntlm_auth.c  2006-03-08 07:30:43 UTC (rev 14032)
+++ trunk/source/utils/ntlm_auth.c  2006-03-08 08:22:42 UTC (rev 14033)
@@ -698,6 +698,7 @@
} else if (NT_STATUS_IS_OK(nt_status)) {
char *reply_base64 = base64_encode_data_blob(reply);
x_fprintf(x_stdout, "AF %s\n", reply_base64);
+   SAFE_FREE(reply_base64);
DEBUG(10, ("NTLMSSP OK!\n"));
if (ntlmssp_state)
ntlmssp_end(&ntlmssp_state);