[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-809-g4f6d172

2009-02-12 Thread Volker Lendecke
The branch, master has been updated
   via  4f6d1728254c8503e71c6fdd008fb7264dec26c5 (commit)
   via  263b798db9bd6c26a51fbf38e4d5d693d234fa5f (commit)
   via  aff48fba1825b2838818ab2f1d037fae32ae132a (commit)
  from  d8c54fddda2dba3cbc5fc13e93431b152813892e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 4f6d1728254c8503e71c6fdd008fb7264dec26c5
Author: Björn Jacke b...@sernet.de
Date:   Thu Feb 12 11:14:18 2009 +0100

There are systems where nanosleep is in libc *and* in librt.

Let's just do the test in librt when the first one failed.

commit 263b798db9bd6c26a51fbf38e4d5d693d234fa5f
Author: Björn Jacke b...@sernet.de
Date:   Wed Feb 11 21:19:01 2009 +0100

tidy up timestamp checks

AC_CHECK_MEMBERS should be a sufficient check, there's no need to do manual
compile tests. We can also assume that we have ctime and atime members when 
we
have the mtime member.

commit aff48fba1825b2838818ab2f1d037fae32ae132a
Author: Björn Jacke b...@sernet.de
Date:   Thu Feb 12 12:29:35 2009 +0100

today valgrind is available on 64bit Linux, too

---

Summary of changes:
 source3/configure.in   |  315 ++-
 source3/include/includes.h |5 +-
 source3/lib/time.c |   66 +-
 3 files changed, 49 insertions(+), 337 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 10ce6f6..d11ece1 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -703,18 +703,6 @@ CPPFLAGS=$old_CPPFLAGS
 # subdirectory of headers.
 AC_CHECK_HEADERS(valgrind.h valgrind/valgrind.h valgrind/memcheck.h)
 
-# check for linux on amd64 since valgrind is not quite there yet
-case $host_os in
-   *linux*)
-   case $UNAME_P in
-   *x86_64*)
-   AC_DEFINE(HAVE_64BIT_LINUX,1,[Whether we are 
running on 64bit linux])
-   ;;
-   esac
-   ;;
-esac
-
-
 #
 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
 # This causes configure to fail to detect it. Check for shadow separately on 
HPUX.
@@ -1041,8 +1029,7 @@ AC_CHECK_FUNCS(getdents64)
 AC_CHECK_FUNCS(setenv strcasecmp fcvt fcvtl)
 AC_CHECK_FUNCS(syslog vsyslog timegm)
 AC_CHECK_FUNCS(setlocale nl_langinfo)
-AC_CHECK_FUNCS(nanosleep)
-AC_CHECK_LIB_EXT(rt, LIBS, nanosleep)
+AC_CHECK_FUNCS(nanosleep,,[AC_CHECK_LIB_EXT(rt, LIBS, nanosleep)])
 AC_CHECK_FUNCS(mlock munlock mlockall munlockall)
 AC_CHECK_FUNCS(memalign posix_memalign hstrerror)
 AC_CHECK_HEADERS(sys/mman.h)
@@ -1311,301 +1298,29 @@ fi
 
 #
 # Check whether struct stat has timestamps with sub-second resolution.
-# At least IRIX and Solaris have these.  FREEBSD does as well,
-# but with different members
-#
-# We check that
-#  all of st_mtim, st_atim and st_ctim exist
-#  all of the members are in fact of type struct timespec
 #
-# There is some conflicting standards weirdness about whether we should use
-# struct timespec or timespec_t. Linux doesn't have timespec_t, so we
-# prefer struct timespec.
-AC_CACHE_CHECK([whether struct stat has timespec timestamps],
-samba_cv_stat_timespec_hires,
-  [
-  AC_TRY_COMPILE(
- [
-#if TIME_WITH_SYS_TIME
-# include sys/time.h
-# include time.h
-#else
-# if HAVE_SYS_TIME_H
-#  include sys/time.h
-# else
-#  include time.h
-# endif
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include sys/stat.h
-#endif
- ],
- [
- struct timespec t;
- struct stat s = {0};
- t = s.st_mtimespec;
- t = s.st_ctimespec;
- t = s.st_atimespec;
-   ],
-  samba_cv_stat_timespec_hires=yes, samba_cv_stat_timespec_hires=no)
-  ])
-
-if test x$samba_cv_stat_timespec_hires = xyes ; then
-AC_DEFINE(HAVE_STAT_ST_MTIMESPEC, 1, [whether struct stat contains 
st_mtimepec])
-AC_DEFINE(HAVE_STAT_ST_ATIMESPEC, 1, [whether struct stat contains 
st_atimespec])
-AC_DEFINE(HAVE_STAT_ST_CTIMESPEC, 1, [whether struct stat contains 
st_ctimespec])
-AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, [whether struct stat has 
sub-second timestamps])
-fi
 
-
-
-AC_CACHE_CHECK([whether struct stat has sub-second timestamps], 
samba_cv_stat_hires,
-[
-   AC_TRY_COMPILE(
-   [
-#if TIME_WITH_SYS_TIME
-# include sys/time.h
-# include time.h
-#else
-# if HAVE_SYS_TIME_H
-#  include sys/time.h
-# else
-#  include time.h
-# endif
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include sys/stat.h
-#endif
-   ],
-   [
-   struct timespec t;
-   struct stat s = {0};
-   t.tv_sec = s.st_mtim.tv_sec;
-   t.tv_nsec = s.st_mtim.tv_nsec;
-   t.tv_sec = s.st_ctim.tv_sec;
- 

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4943-g0697cff

2009-02-12 Thread Derrell Lipman
The branch, v3-3-test has been updated
   via  0697cffe211a922c816b6c75230c4186328498ed (commit)
  from  a8a7040d7dbffe7b1c2bccb8b46e08fb996786ac (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -
commit 0697cffe211a922c816b6c75230c4186328498ed
Author: Derrell Lipman derrell.lip...@unwireduniverse.com
Date:   Thu Feb 12 09:16:48 2009 -0500

[Bug 6069] Add a fstatvfs function for libsmbclient

- DFS is not a POSIX feature, so the state of that bit should be zero if DFS
  is *not* supported. Bit feature reversed.

- Added smbc_statvfs function

Derrell

---

Summary of changes:
 examples/libsmbclient/Makefile |5 ++
 examples/libsmbclient/testfstatvfs.c   |6 +-
 .../libsmbclient/{testfstatvfs.c = teststatvfs.c} |   34 ++---
 source/include/libsmb_internal.h   |7 +++
 source/include/libsmbclient.h  |   31 +++-
 source/libsmb/libsmb_compat.c  |7 +++
 source/libsmb/libsmb_context.c |1 +
 source/libsmb/libsmb_setget.c  |   12 
 source/libsmb/libsmb_stat.c|   56 +++-
 9 files changed, 123 insertions(+), 36 deletions(-)
 copy examples/libsmbclient/{testfstatvfs.c = teststatvfs.c} (74%)


Changeset truncated at 500 lines:

diff --git a/examples/libsmbclient/Makefile b/examples/libsmbclient/Makefile
index 7ad28dc..728dbe0 100644
--- a/examples/libsmbclient/Makefile
+++ b/examples/libsmbclient/Makefile
@@ -24,6 +24,7 @@ TESTS=testsmbc \
teststat \
teststat2 \
teststat3 \
+   teststatvfs \
testfstatvfs \
testtruncate \
testchmod \
@@ -75,6 +76,10 @@ teststat3: teststat3.o
@echo Linking teststat3
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $ $(LIBSMBCLIENT) -lpopt
 
+teststatvfs: teststatvfs.o
+   @echo Linking teststatvfs
+   $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $ $(LIBSMBCLIENT) -lpopt
+
 testfstatvfs: testfstatvfs.o
@echo Linking testfstatvfs
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $ $(LIBSMBCLIENT) -lpopt
diff --git a/examples/libsmbclient/testfstatvfs.c 
b/examples/libsmbclient/testfstatvfs.c
index f8a6870..b4dafef 100644
--- a/examples/libsmbclient/testfstatvfs.c
+++ b/examples/libsmbclient/testfstatvfs.c
@@ -105,13 +105,13 @@ int main(int argc, char * argv[])
 printf(case_sensitive );
 }
 
-if (statvfsbuf.f_flag  SMBC_VFS_FEATURE_NO_DFS)
+if (statvfsbuf.f_flag  SMBC_VFS_FEATURE_DFS)
 {
-printf(NO_DFS );
+printf(DFS );
 }
 else
 {
-printf(dfs );
+printf(no_dfs );
 }
 
 printf(\n);
diff --git a/examples/libsmbclient/testfstatvfs.c 
b/examples/libsmbclient/teststatvfs.c
similarity index 74%
copy from examples/libsmbclient/testfstatvfs.c
copy to examples/libsmbclient/teststatvfs.c
index f8a6870..8812002 100644
--- a/examples/libsmbclient/testfstatvfs.c
+++ b/examples/libsmbclient/teststatvfs.c
@@ -38,33 +38,7 @@ int main(int argc, char * argv[])
 *p = '\0';
 }
 
-/* Determine if it's a file or a folder */
-if (smbc_stat(path, statbuf)  0)
-{
-perror(smbc_stat);
-continue;
-}
-
-if (S_ISREG(statbuf.st_mode))
-{
-if ((fd = smbc_open(path, O_RDONLY, 0))  0)
-{
-perror(smbc_open);
-continue;
-}
-}
-else
-{
-if ((fd = smbc_opendir(path))  0)
-{
-perror(smbc_opendir);
-continue;
-}
-}
-
-ret = smbc_fstatvfs(fd, statvfsbuf);
-
-smbc_close(fd);
+ret = smbc_statvfs(path, statvfsbuf);
 
 if (ret  0)
 {
@@ -105,13 +79,13 @@ int main(int argc, char * argv[])
 printf(case_sensitive );
 }
 
-if (statvfsbuf.f_flag  SMBC_VFS_FEATURE_NO_DFS)
+if (statvfsbuf.f_flag  SMBC_VFS_FEATURE_DFS)
 {
-printf(NO_DFS );
+printf(DFS );
 }
 else
 {
-printf(dfs );
+printf(no_dfs );
 }
 
 printf(\n);
diff --git a/source/include/libsmb_internal.h b/source/include/libsmb_internal.h
index edf3a6e..166685c 100644
--- a/source/include/libsmb_internal.h
+++ b/source/include/libsmb_internal.h
@@ -197,6 +197,7 @@ struct SMBC_internal_data {
 smbc_stat_fnstat_fn;
 smbc_fstat_fn   fstat_fn;
 #endif
+smbc_statvfs_fn 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-813-g082ba6a

2009-02-12 Thread Jelmer Vernooij
The branch, master has been updated
   via  082ba6a1ad3a68aff118d96f855a2aa65eaeb359 (commit)
   via  762fdc8c5c2db304f3dc4536c19d69366d1399df (commit)
   via  7048e75aeebc4d033c4e8425c364fe2e3e84f27b (commit)
   via  be9a4157f050f0b54fd369181ee273029c0f81fc (commit)
  from  4f6d1728254c8503e71c6fdd008fb7264dec26c5 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 082ba6a1ad3a68aff118d96f855a2aa65eaeb359
Merge: 762fdc8c5c2db304f3dc4536c19d69366d1399df 
4f6d1728254c8503e71c6fdd008fb7264dec26c5
Author: Jelmer Vernooij jel...@samba.org
Date:   Thu Feb 12 16:00:46 2009 +0100

Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit 762fdc8c5c2db304f3dc4536c19d69366d1399df
Author: Jelmer Vernooij jel...@samba.org
Date:   Thu Feb 12 16:00:11 2009 +0100

Provide a SamDB TestCase-class that can be used by OpenChange.

commit 7048e75aeebc4d033c4e8425c364fe2e3e84f27b
Author: Jelmer Vernooij jel...@samba.org
Date:   Thu Feb 12 15:58:11 2009 +0100

Use created loadparm context, rather than the one specified on the 
command-line.

commit be9a4157f050f0b54fd369181ee273029c0f81fc
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Feb 11 19:04:33 2009 +0100

Catch specific exceptions, rather than catching everything, which might 
hide other exceptions silently.

---

Summary of changes:
 source4/scripting/python/samba/provision.py   |6 +++---
 source4/scripting/python/samba/tests/samdb.py |   14 --
 2 files changed, 15 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/provision.py 
b/source4/scripting/python/samba/provision.py
index d77b487..10daf1b 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -454,7 +454,7 @@ def setup_samdb_partitions(samdb_path, setup_path, message, 
lp, session_info,
   credentials=credentials, lp=lp)
 # Wipes the database
 samdb.erase()
-except:
+except LdbError:
 os.unlink(samdb_path)
 samdb = SamDB(samdb_path, session_info=session_info, 
   credentials=credentials, lp=lp)
@@ -647,7 +647,7 @@ def setup_templatesdb(path, setup_path, session_info, 
credentials, lp):
 # Wipes the database
 try:
 templates_ldb.erase()
-except:
+except LdbError:
 os.unlink(path)
 
 
templates_ldb.load_ldif_file_add(setup_path(provision_templates_init.ldif))
@@ -1222,7 +1222,7 @@ def provision_backend(setup_dir=None, message=None,
 schemadb_path = os.path.join(paths.ldapdir, schema-tmp.ldb)
 try:
 os.unlink(schemadb_path)
-except:
+except OSError:
 pass
 
 schemadb = Ldb(schemadb_path, lp=lp)
diff --git a/source4/scripting/python/samba/tests/samdb.py 
b/source4/scripting/python/samba/tests/samdb.py
index 434d7a7..d0b95cf 100644
--- a/source4/scripting/python/samba/tests/samdb.py
+++ b/source4/scripting/python/samba/tests/samdb.py
@@ -21,13 +21,19 @@ from samba.credentials import Credentials
 import os
 from samba.provision import setup_samdb, guess_names, setup_templatesdb, 
make_smbconf, find_setup_dir
 from samba.samdb import SamDB
-from samba.tests import cmdline_loadparm, TestCaseInTempDir
+from samba.tests import TestCaseInTempDir
 from samba.dcerpc import security
 from unittest import TestCase
 import uuid
 from samba import param
 
+
 class SamDBTestCase(TestCaseInTempDir):
+Base-class for tests with a Sam Database.
+
+This is used by the Samba SamDB-tests, but e.g. also by the OpenChange
+provisioning tests (which need a Sam).
+
 
 def setup_path(self, relpath):
 return os.path.join(find_setup_dir(), relpath)
@@ -69,7 +75,7 @@ class SamDBTestCase(TestCaseInTempDir):
   self.setup_path, session_info=session_info, 
   credentials=creds, lp=self.lp)
 self.samdb = setup_samdb(path, self.setup_path, session_info, creds, 
- cmdline_loadparm, names, 
+ self.lp, names, 
  lambda x: None, domainsid, 
  # no aci, domainguid, 
  policyguid, False, secret, 
@@ -82,6 +88,10 @@ class SamDBTestCase(TestCaseInTempDir):
 os.remove(os.path.join(self.tempdir, f))
 super(SamDBTestCase, self).tearDown()
 
+
+class SamDBTests(SamDBTestCase):
+Tests for the SamDB implementation.
+
 def test_add_foreign(self):
 self.samdb.add_foreign(self.domaindn, S-1-5-7, Somedescription)
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-814-gae25957

2009-02-12 Thread Derrell Lipman
The branch, master has been updated
   via  ae259575c447e61665c8e7070c476914161b953f (commit)
  from  082ba6a1ad3a68aff118d96f855a2aa65eaeb359 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ae259575c447e61665c8e7070c476914161b953f
Author: Derrell Lipman derrell.lip...@unwireduniverse.com
Date:   Thu Feb 12 10:39:17 2009 -0500

[Bug 6069] Add a fstatvfs function for libsmbclient

- port functionality from v3_3_test to master

Derrell

---

Summary of changes:
 examples/libsmbclient/Makefile   |   10 ++
 examples/libsmbclient/testfstatvfs.c |  122 
 examples/libsmbclient/teststatvfs.c  |   96 +++
 source3/include/includes.h   |1 +
 source3/include/libsmb_internal.h|   14 +++
 source3/include/libsmbclient.h   |   75 +++
 source3/include/proto.h  |   15 +++
 source3/libsmb/clifsinfo.c   |  145 +
 source3/libsmb/libsmb_compat.c   |   15 +++
 source3/libsmb/libsmb_context.c  |2 +
 source3/libsmb/libsmb_setget.c   |   24 +
 source3/libsmb/libsmb_stat.c |  169 ++
 12 files changed, 688 insertions(+), 0 deletions(-)
 create mode 100644 examples/libsmbclient/testfstatvfs.c
 create mode 100644 examples/libsmbclient/teststatvfs.c


Changeset truncated at 500 lines:

diff --git a/examples/libsmbclient/Makefile b/examples/libsmbclient/Makefile
index 047addc..728dbe0 100644
--- a/examples/libsmbclient/Makefile
+++ b/examples/libsmbclient/Makefile
@@ -24,6 +24,8 @@ TESTS=testsmbc \
teststat \
teststat2 \
teststat3 \
+   teststatvfs \
+   testfstatvfs \
testtruncate \
testchmod \
testutime \
@@ -74,6 +76,14 @@ teststat3: teststat3.o
@echo Linking teststat3
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $ $(LIBSMBCLIENT) -lpopt
 
+teststatvfs: teststatvfs.o
+   @echo Linking teststatvfs
+   $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $ $(LIBSMBCLIENT) -lpopt
+
+testfstatvfs: testfstatvfs.o
+   @echo Linking testfstatvfs
+   $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $ $(LIBSMBCLIENT) -lpopt
+
 testtruncate: testtruncate.o
@echo Linking testtruncate
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $ $(LIBSMBCLIENT) -lpopt
diff --git a/examples/libsmbclient/testfstatvfs.c 
b/examples/libsmbclient/testfstatvfs.c
new file mode 100644
index 000..b4dafef
--- /dev/null
+++ b/examples/libsmbclient/testfstatvfs.c
@@ -0,0 +1,122 @@
+#include sys/types.h
+#include sys/statvfs.h
+#include stdio.h 
+#include unistd.h
+#include string.h 
+#include time.h 
+#include errno.h
+#include libsmbclient.h 
+#include get_auth_data_fn.h
+
+
+int main(int argc, char * argv[]) 
+{ 
+int i;
+int fd;
+int ret;
+int debug = 0;
+char *  p;
+charpath[2048];
+struct stat statbuf;
+struct statvfs  statvfsbuf;
+
+smbc_init(get_auth_data_fn, debug); 
+
+for (;;)
+{
+fprintf(stdout, Path: );
+*path = '\0';
+fgets(path, sizeof(path) - 1, stdin);
+if (strlen(path) == 0)
+{
+return 0;
+}
+
+p = path + strlen(path) - 1;
+if (*p == '\n')
+{
+*p = '\0';
+}
+
+/* Determine if it's a file or a folder */
+if (smbc_stat(path, statbuf)  0)
+{
+perror(smbc_stat);
+continue;
+}
+
+if (S_ISREG(statbuf.st_mode))
+{
+if ((fd = smbc_open(path, O_RDONLY, 0))  0)
+{
+perror(smbc_open);
+continue;
+}
+}
+else
+{
+if ((fd = smbc_opendir(path))  0)
+{
+perror(smbc_opendir);
+continue;
+}
+}
+
+ret = smbc_fstatvfs(fd, statvfsbuf);
+
+smbc_close(fd);
+
+if (ret  0)
+{
+perror(fstatvfs);
+}
+else
+{
+printf(\n);
+printf(Block Size: %lu\n, statvfsbuf.f_bsize);
+printf(Fragment Size: %lu\n, statvfsbuf.f_frsize);
+printf(Blocks: %llu\n, statvfsbuf.f_blocks);
+printf(Free Blocks: %llu\n, statvfsbuf.f_bfree);
+printf(Available Blocks: %llu\n, statvfsbuf.f_bavail);
+printf(Files : %llu\n, statvfsbuf.f_files);
+printf(Free Files: %llu\n, statvfsbuf.f_ffree);
+printf(Available Files: %llu\n, statvfsbuf.f_favail);
+printf(File System ID: %lu\n, statvfsbuf.f_fsid);
+printf(\n);
+
+printf(Flags: 0x%lx\n, statvfsbuf.f_flag);
+printf(Extended Features: );
+
+if 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-821-gc201a34

2009-02-12 Thread Günther Deschner
The branch, master has been updated
   via  c201a341caee2bd88c9b37add75d004e1c8d4202 (commit)
   via  75c6bbea3b77dd283e0c9458dc85f0caca33399d (commit)
   via  80b3e5b36efb5f7c48b43e8f5d67a102ae71ebf5 (commit)
   via  8fa71b1a0858b5098b99478a869b3ffc9c41eccf (commit)
   via  135135e3a0a84d19d1bc6df1cc3c5813d1a244ec (commit)
   via  aa9eac08cd2614eefca6c6bc673e07619a55f842 (commit)
   via  aa60ffc6f8926a5d108ff8fbfb05f7612386f1bb (commit)
  from  ae259575c447e61665c8e7070c476914161b953f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit c201a341caee2bd88c9b37add75d004e1c8d4202
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 18:04:06 2009 +0100

re-run make samba3-idl.

Guenther

commit 75c6bbea3b77dd283e0c9458dc85f0caca33399d
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 12:10:16 2009 +0100

s3-spoolss: add init_systemtime helper.

Guenther

commit 80b3e5b36efb5f7c48b43e8f5d67a102ae71ebf5
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 17:45:09 2009 +0100

spoolss: always set version 2 in notify info and option structs.

Guenther

commit 8fa71b1a0858b5098b99478a869b3ffc9c41eccf
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 17:26:17 2009 +0100

spoolss: add spoolss_NotifyTable enum.

Guenther

commit 135135e3a0a84d19d1bc6df1cc3c5813d1a244ec
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 14:00:49 2009 +0100

spoolss: fix some cases in the spoolss_NotifyData union.

Guenther

commit aa9eac08cd2614eefca6c6bc673e07619a55f842
Author: Günther Deschner g...@samba.org
Date:   Wed Feb 11 21:32:18 2009 +0100

spoolss: add spoolss_DriverInfo8.

Guenther

commit aa60ffc6f8926a5d108ff8fbfb05f7612386f1bb
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 00:48:29 2009 +0100

spoolss: fix spoolss_AddPrinterEx IDL.

Guenther

---

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c   |2 +
 librpc/gen_ndr/cli_spoolss.h   |1 +
 librpc/gen_ndr/ndr_spoolss.c   |  343 ++--
 librpc/gen_ndr/ndr_spoolss.h   |7 +-
 librpc/gen_ndr/spoolss.h   |   82 --
 librpc/gen_ndr/srv_spoolss.c   |   13 +
 librpc/idl/spoolss.idl |   76 +++--
 source3/Makefile.in|1 +
 source3/include/proto.h|5 +
 .../eventlog.h = rpc_client/init_spoolss.c}   |   39 ++--
 10 files changed, 321 insertions(+), 248 deletions(-)
 copy source3/{include/eventlog.h = rpc_client/init_spoolss.c} (55%)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index 2f15cb3..6225d2d 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -3314,6 +3314,7 @@ NTSTATUS rpccli_spoolss_AddPrinterEx(struct 
rpc_pipe_client *cli,
 struct security_descriptor *secdesc /* 
[in] [unique] */,
 uint32_t ulevel /* [in]  */,
 union spoolss_UserLevel userlevel /* [in] 
[switch_is(ulevel)] */,
+struct policy_handle *handle /* [out] 
[ref] */,
 WERROR *werror)
 {
struct spoolss_AddPrinterEx r;
@@ -3351,6 +3352,7 @@ NTSTATUS rpccli_spoolss_AddPrinterEx(struct 
rpc_pipe_client *cli,
}
 
/* Return variables */
+   *handle = *r.out.handle;
 
/* Return result */
if (werror) {
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index 6903aa6..34c50a0 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -420,6 +420,7 @@ NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client 
*cli,
 struct security_descriptor *secdesc /* 
[in] [unique] */,
 uint32_t ulevel /* [in]  */,
 union spoolss_UserLevel userlevel /* [in] 
[switch_is(ulevel)] */,
+struct policy_handle *handle /* [out] 
[ref] */,
 WERROR *werror);
 NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli,
   TALLOC_CTX *mem_ctx,
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index 5525ad4..1bb419b 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -57,6 +57,65 @@ _PUBLIC_ void ndr_print_spoolss_Time(struct ndr_print *ndr, 
const char *name, co
ndr-depth--;
 }
 
+static size_t ndr_size_spoolss_Time(const struct spoolss_Time *r, struct 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-822-g44c7721

2009-02-12 Thread Volker Lendecke
The branch, master has been updated
   via  44c77218842b1328907d2dcb9250f6da52e28d30 (commit)
  from  c201a341caee2bd88c9b37add75d004e1c8d4202 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 44c77218842b1328907d2dcb9250f6da52e28d30
Author: Volker Lendecke v...@samba.org
Date:   Wed Feb 11 13:45:15 2009 +0100

Fix make etags properly :-)

---

Summary of changes:
 source3/Makefile.in |   37 +
 1 files changed, 1 insertions(+), 36 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 0716013..e11633f 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -2841,42 +2841,7 @@ include/build_env.h: script/build_env.sh
 proto::
 
 etags::
-   etags `find $(srcdir) -name *.[ch]`
-   etags --append `find $(srcdir)/../lib -name *.[ch]`
-   etags --append `find $(srcdir)/../librpc -name *.[ch]`
-   etags --append `find $(srcdir)/../libcli -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/client -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/auth -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/rpc_server -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/kdc -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/winbind -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/scripting -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/heimdal_build -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/libcli -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/ntp_signd -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/ldap_server -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/smb_server -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/include -name *.[ch]`
-   etags --append `find $(srcdir)/../nsswitch -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/cldap_server -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/utils -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/librpc -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/libnet -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/web_server -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/heimdal -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/wrepl_server -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/dynconfig -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/param -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/lib -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/nbt_server -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/build -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/ntvfs -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/torture -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/cluster -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/ntptr -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/smbd -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/script -name *.[ch]`
-   etags --append `find $(srcdir)/../source4/dsdb -name *.[ch]`
+   find $(srcdir)/.. -name *.[ch] | xargs -n 100 etags --append
 
 ctags::
ctags `find $(srcdir)/.. -name *.[ch] | grep -v include/proto\.h`


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3452-g9aeca67

2009-02-12 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  9aeca67cbeb1a04082b02d54150d042a7b5a241d (commit)
  from  0bd5253c05530b25aa9261019ef028728a8f9c75 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 9aeca67cbeb1a04082b02d54150d042a7b5a241d
Author: Dan Sledz dsl...@isilon.com
Date:   Thu Feb 12 12:01:16 2009 -0800

Fix double free caused by incorrect talloc_steal usage.

---

Summary of changes:
 source/auth/auth_util.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index a183afb..2f9cfa3 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -565,8 +565,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
}
 
result-sam_account = sampass;
-   /* Ensure thaat the sampass will be freed with the result */
-   talloc_steal(result, sampass);
result-unix_name = pwd-pw_name;
/* Ensure that we keep pwd-pw_name, because we will free pwd below */
talloc_steal(result, pwd-pw_name);
@@ -650,6 +648,8 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
 pdb_get_username(sampass), result-unix_name));
 
*server_info = result;
+   /* Ensure thaat the sampass will be freed with the result */
+   talloc_steal(result, sampass);
 
return NT_STATUS_OK;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4944-g7274764

2009-02-12 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  7274764436deb21f821c7a62a3ac3454e1af9025 (commit)
  from  0697cffe211a922c816b6c75230c4186328498ed (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -
commit 7274764436deb21f821c7a62a3ac3454e1af9025
Author: Dan Sledz dsl...@isilon.com
Date:   Thu Feb 12 12:02:43 2009 -0800

Fix double free caused by incorrect talloc_steal usage.

---

Summary of changes:
 source/auth/auth_util.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index d2a8591..9ee19ca 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -573,8 +573,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
}
 
result-sam_account = sampass;
-   /* Ensure thaat the sampass will be freed with the result */
-   talloc_steal(result, sampass);
result-unix_name = pwd-pw_name;
/* Ensure that we keep pwd-pw_name, because we will free pwd below */
talloc_steal(result, pwd-pw_name);
@@ -665,6 +663,8 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
 pdb_get_username(sampass), result-unix_name));
 
*server_info = result;
+   /* Ensure thaat the sampass will be freed with the result */
+   talloc_steal(result, sampass);
 
return NT_STATUS_OK;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-830-gfeec49d

2009-02-12 Thread Günther Deschner
The branch, master has been updated
   via  feec49d5cd07a69991d1bc6dc6325ecda21a19a8 (commit)
   via  a4b0c5d871bcc8ec7a16a7bfaf891bd45934ffdf (commit)
   via  38e2888653638393ba603c6a4ffd2c3dfa5c718c (commit)
   via  41f17a1fc21ba806a16c7e15061b570abcabb870 (commit)
   via  30e18aadc3710116c74c47563c6476d520685cfc (commit)
   via  97f15fcd68b142b5d304b9fec0a09c6361ee4ec0 (commit)
   via  09b3016a1a17fabbef3e87c2ef51eb8d903b19a4 (commit)
   via  2876c77c8d0a6f26bbe4c5b5678209dabbd7ff64 (commit)
  from  44c77218842b1328907d2dcb9250f6da52e28d30 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit feec49d5cd07a69991d1bc6dc6325ecda21a19a8
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 22:28:45 2009 +0100

s3-spoolss: remove old spoolss_SetPrinterDataEx.

Guenther

commit a4b0c5d871bcc8ec7a16a7bfaf891bd45934ffdf
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 22:23:04 2009 +0100

s3-spoolss: use pidl for _spoolss_SetPrinterDataEx.

Guenther

commit 38e2888653638393ba603c6a4ffd2c3dfa5c718c
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 22:28:10 2009 +0100

s3-net: use rpccli_spoolss_SetPrinterDataEx.

Guenther

commit 41f17a1fc21ba806a16c7e15061b570abcabb870
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 22:07:30 2009 +0100

s3-spoolss: remove old spoolss_GetPrinterDataEx.

Guenther

commit 30e18aadc3710116c74c47563c6476d520685cfc
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 22:06:54 2009 +0100

s3-rpcclient: use rpccli_spoolss_GetPrinterDataEx.

Guenther

commit 97f15fcd68b142b5d304b9fec0a09c6361ee4ec0
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 19:42:57 2009 +0100

s3-spoolss: use pidl for _spoolss_GetPrinterDataEx.

Guenther

commit 09b3016a1a17fabbef3e87c2ef51eb8d903b19a4
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 22:44:29 2009 +0100

s3: re-run make samba3-idl.

Guenther

commit 2876c77c8d0a6f26bbe4c5b5678209dabbd7ff64
Author: Günther Deschner g...@samba.org
Date:   Thu Feb 12 22:29:08 2009 +0100

spoolss: fix IDL for spoolss_SetPrinterDataEx.

Guenther

---

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c|2 +-
 librpc/gen_ndr/cli_spoolss.h|2 +-
 librpc/gen_ndr/ndr_spoolss.c|   20 +++-
 librpc/gen_ndr/spoolss.h|2 +-
 librpc/idl/spoolss.idl  |2 +-
 source3/include/proto.h |   20 
 source3/include/rpc_spoolss.h   |   39 
 source3/rpc_client/cli_spoolss.c|   84 
 source3/rpc_parse/parse_spoolss.c   |  184 ---
 source3/rpc_server/srv_spoolss.c|   45 +
 source3/rpc_server/srv_spoolss_nt.c |  134 +
 source3/rpcclient/cmd_spoolss.c |   44 -
 source3/utils/net_rpc_printer.c |   11 ++-
 13 files changed, 122 insertions(+), 467 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index 6225d2d..b8836f4 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -3636,7 +3636,7 @@ NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct 
rpc_pipe_client *cli,
 const char *key_name /* [in] 
[charset(UTF16)] */,
 const char *value_name /* [in] 
[charset(UTF16)] */,
 uint32_t type /* [in]  */,
-DATA_BLOB buffer /* [in]  */,
+uint8_t *buffer /* [in] 
[ref,size_is(offered)] */,
 uint32_t offered /* [in]  */,
 WERROR *werror)
 {
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index 34c50a0..243de02 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -457,7 +457,7 @@ NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct 
rpc_pipe_client *cli,
 const char *key_name /* [in] 
[charset(UTF16)] */,
 const char *value_name /* [in] 
[charset(UTF16)] */,
 uint32_t type /* [in]  */,
-DATA_BLOB buffer /* [in]  */,
+uint8_t *buffer /* [in] 
[ref,size_is(offered)] */,
 uint32_t offered /* [in]  */,
 WERROR *werror);
 NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli,
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index 1bb419b..f99fd54 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-831-g5cd4b7b

2009-02-12 Thread Steven Danneman
The branch, master has been updated
   via  5cd4b7b7c03df6e896186d985b6858a06aa40b3f (commit)
  from  feec49d5cd07a69991d1bc6dc6325ecda21a19a8 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 5cd4b7b7c03df6e896186d985b6858a06aa40b3f
Author: Steven Danneman steven.danne...@isilon.com
Date:   Thu Feb 12 13:01:45 2009 -0800

s3: Added new parameter map untrusted to domain

When enabled this reverts smbd to the legacy domain remapping behavior when
a user provides an untrusted domain

This partially reverts d8c54fdd

---

Summary of changes:
 WHATSNEW.txt |   23 +--
 source3/auth/auth_util.c |   12 
 source3/include/proto.h  |2 ++
 source3/param/loadparm.c |   13 +
 source3/passdb/passdb.c  |   18 ++
 5 files changed, 62 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 65d226c..066f718 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -10,8 +10,27 @@ system at https://bugzilla.samba.org/.
 
 Major enhancements in Samba 3.4.0 include:
 
-o
-
+Authentication Changes:
+o Changed the way smbd handles untrusted domain names given during user
+  authentication
+
+Authentication Changes
+==
+
+Previously, when Samba was a domain member and a client was connecting using an
+untrusted domain name, such as BOGUS\user smbd would remap the untrusted
+domain to the primary domain smbd was a member of and attempt authentication
+using that DOMAIN\user name.  This differed from how a Windows member server
+would behave.  Now, smbd will replace the BOGUS name with it's SAM name.  In
+the case where smbd is acting as a PDC this will be DOMAIN\user.  In the case
+where smbd is acting as a domain member server this will be WORKSTATION\user.
+Thus, smbd will never assume that an incoming user name which is not qualified
+with the same primary domain, is part of smbd's primary domain.
+
+While this behavior matches Windows, it may break some workflows which depended
+on smbd to always pass through bogus names to the DC for verification.  A new
+parameter map untrusted to domain can be enabled to revert to the legacy
+behavior.
 
 ##
 Reporting bugs  Development Discussion
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index f942b2e..892e5c4 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -226,14 +226,18 @@ NTSTATUS make_user_info_map(auth_usersupplied_info 
**user_info,
if (!is_trusted_domain(domain) 
!strequal(domain, get_global_sam_name()) )
{
-   domain = get_global_sam_name();
-   DEBUG(5, (Mapped domain from [%s] to [%s] for user [%s] on 
+   if (lp_map_untrusted_to_domain())
+   domain = my_sam_name();
+   else
+   domain = get_global_sam_name();
+   DEBUG(5, (Mapped domain from [%s] to [%s] for user [%s] from 
  workstation [%s]\n,
  client_domain, domain, smb_name, wksta_name));
}
 
-   /* we know that it is a trusted domain (and we are allowing them) or it
-* is our domain */
+   /* We know that the given domain is trusted (and we are allowing them),
+* it is our global SAM name, or for legacy behavior it is our
+* primary domain name */
 
result = make_user_info(user_info, smb_name, internal_username,
  client_domain, domain, wksta_name,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2365015..7ad063e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4067,6 +4067,7 @@ bool lp_nt_status_support(void);
 bool lp_stat_cache(void);
 int lp_max_stat_cache_size(void);
 bool lp_allow_trusted_domains(void);
+bool lp_map_untrusted_to_domain(void);
 int lp_restrict_anonymous(void);
 bool lp_lanman_auth(void);
 bool lp_ntlm_auth(void);
@@ -4435,6 +4436,7 @@ bool sid_check_is_in_our_domain(const DOM_SID *sid);
 
 /* The following definitions come from passdb/passdb.c  */
 
+const char *my_sam_name(void);
 struct samu *samu_new( TALLOC_CTX *ctx );
 NTSTATUS samu_set_unix(struct samu *user, const struct passwd *pwd);
 NTSTATUS samu_alloc_rid_unix(struct samu *user, const struct passwd *pwd);
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 0dfbb09..a127ec5 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -345,6 +345,7 @@ struct global {
struct param_opt_struct *param_opt;
int cups_connection_timeout;
char *szSMBPerfcountModule;
+   bool bMapUntrustedToDomain;
 };
 
 static struct global Globals;
@@ -1776,6 +1777,15 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-832-g1b6543c

2009-02-12 Thread Volker Lendecke
The branch, master has been updated
   via  1b6543c5f9acea16b1ec4cf6d7c46283732b4522 (commit)
  from  5cd4b7b7c03df6e896186d985b6858a06aa40b3f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 1b6543c5f9acea16b1ec4cf6d7c46283732b4522
Author: Volker Lendecke v...@samba.org
Date:   Thu Feb 12 22:58:24 2009 +0100

Fix Coverity IDs 879 and 880 (RESOURCE_LEAK, REVERSE_INULL)

---

Summary of changes:
 source3/client/umount.cifs.c |   11 +++
 1 files changed, 7 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/umount.cifs.c b/source3/client/umount.cifs.c
index 81925ed..1227e7a 100644
--- a/source3/client/umount.cifs.c
+++ b/source3/client/umount.cifs.c
@@ -240,10 +240,9 @@ static int remove_from_mtab(char * mountpoint)
 static char *
 canonicalize(char *path)
 {
-   char *canonical = malloc (PATH_MAX + 1);
+   char *canonical;
 
-   if (!canonical) {
-   fprintf(stderr, Error! Not enough memory!\n);
+   if (path == NULL) {
return NULL;
}
 
@@ -252,8 +251,12 @@ canonicalize(char *path)
return NULL;
}
 
-   if (path == NULL)
+   canonical = (char *)malloc (PATH_MAX + 1);
+
+   if (!canonical) {
+   fprintf(stderr, Error! Not enough memory!\n);
return NULL;
+   }
 
if (realpath (path, canonical))
return canonical;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-833-gdc19a60

2009-02-12 Thread Steven Danneman
The branch, master has been updated
   via  dc19a60e50b89886f98541ad227e6f3a3bc8720b (commit)
  from  1b6543c5f9acea16b1ec4cf6d7c46283732b4522 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit dc19a60e50b89886f98541ad227e6f3a3bc8720b
Author: Steven Danneman steven.danne...@isilon.com
Date:   Thu Feb 12 14:07:30 2009 -0800

s3 onefs: rename custom parameter to plural to match previous usage

---

Summary of changes:
 source3/modules/onefs.h  |4 ++--
 source3/modules/onefs_acl.c  |4 ++--
 source3/modules/onefs_open.c |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h
index 72be682..b88719f 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -48,8 +48,8 @@ enum onefs_acl_wire_format
 #define PARM_CREATOR_OWNER_GETS_FULL_CONTROL_DEFAULT true
 #define PARM_CTIME_NOW ctime now files
 #define PARM_CTIME_SLOPctime now slop
-#define PARM_IGNORE_SACL ignore sacl
-#define PARM_IGNORE_SACL_DEFAULT false
+#define PARM_IGNORE_SACLS ignore sacls
+#define PARM_IGNORE_SACLS_DEFAULT false
 #define PARM_MTIME_NOW mtime now files
 #define PARM_MTIME_STATIC  mtime static files
 #define PARM_MTIME_SLOPmtime now slop
diff --git a/source3/modules/onefs_acl.c b/source3/modules/onefs_acl.c
index 0239479..7bc4a17 100644
--- a/source3/modules/onefs_acl.c
+++ b/source3/modules/onefs_acl.c
@@ -620,7 +620,7 @@ onefs_fget_nt_acl(vfs_handle_struct *handle, files_struct 
*fsp,
fsp-fsp_name, security_info));
 
if (lp_parm_bool(SNUM(fsp-conn), PARM_ONEFS_TYPE,
-   PARM_IGNORE_SACL, PARM_IGNORE_SACL_DEFAULT)) {
+   PARM_IGNORE_SACLS, PARM_IGNORE_SACLS_DEFAULT)) {
DEBUG(5, (Ignoring SACL on %s.\n, fsp-fsp_name));
security_info = ~SACL_SECURITY_INFORMATION;
}
@@ -851,7 +851,7 @@ NTSTATUS onefs_samba_sd_to_sd(uint32 security_info_sent, 
SEC_DESC *psd,
if (security_info_sent  SACL_SECURITY_INFORMATION) {
 
if (lp_parm_bool(snum, PARM_ONEFS_TYPE,
-   PARM_IGNORE_SACL, PARM_IGNORE_SACL_DEFAULT)) {
+   PARM_IGNORE_SACLS, PARM_IGNORE_SACLS_DEFAULT)) {
DEBUG(5, (Ignoring SACLs.\n));
security_info_sent = ~SACL_SECURITY_INFORMATION;
} else {
diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index e335dc7..1f5f855 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -745,7 +745,7 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
}
 
if (lp_parm_bool(SNUM(fsp-conn), PARM_ONEFS_TYPE,
-   PARM_IGNORE_SACL, PARM_IGNORE_SACL_DEFAULT)) {
+   PARM_IGNORE_SACLS, PARM_IGNORE_SACLS_DEFAULT)) {
access_mask = ~SYSTEM_SECURITY_ACCESS;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-834-gd75fe9b

2009-02-12 Thread Volker Lendecke
The branch, master has been updated
   via  d75fe9b3934d9c8e0c2bbeb8d0a27deb0b2eb58a (commit)
  from  dc19a60e50b89886f98541ad227e6f3a3bc8720b (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit d75fe9b3934d9c8e0c2bbeb8d0a27deb0b2eb58a
Author: Volker Lendecke v...@samba.org
Date:   Thu Feb 12 23:16:18 2009 +0100

Fix Coverity ID 872 -- we have alread dereferenced ac 2 lines above

---

Summary of changes:
 source4/lib/ldb/modules/sort.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/modules/sort.c b/source4/lib/ldb/modules/sort.c
index 2b2a1ab..309101c 100644
--- a/source4/lib/ldb/modules/sort.c
+++ b/source4/lib/ldb/modules/sort.c
@@ -108,7 +108,7 @@ static int sort_compare(struct ldb_message **msg1, struct 
ldb_message **msg2, vo
 
ldb = ldb_module_get_ctx(ac-module);
 
-   if (!ac || ac-sort_result != 0) {
+   if (ac-sort_result != 0) {
/* an error occurred previously,
 * let's exit the sorting by returning always 0 */
return 0;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-835-g147a2e3

2009-02-12 Thread Volker Lendecke
The branch, master has been updated
   via  147a2e3440056ec30d8b386901754a58ea3947d1 (commit)
  from  d75fe9b3934d9c8e0c2bbeb8d0a27deb0b2eb58a (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 147a2e3440056ec30d8b386901754a58ea3947d1
Author: Volker Lendecke v...@samba.org
Date:   Thu Feb 12 23:19:45 2009 +0100

Fix Coverity ID 871 -- do not dereference sp before checking for NULL

---

Summary of changes:
 source4/lib/socket/socket_ip.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/socket/socket_ip.c b/source4/lib/socket/socket_ip.c
index cdb75fe..89b310a 100644
--- a/source4/lib/socket/socket_ip.c
+++ b/source4/lib/socket/socket_ip.c
@@ -552,11 +552,13 @@ static struct in6_addr interpret_addr6(const char *name)
char addr[INET6_ADDRSTRLEN];
struct in6_addr dest6;
const char *sp = name;
-   char *p = strchr_m(sp, '%');
+   char *p;
int ret;
 
if (sp == NULL) return in6addr_any;
 
+   p = strchr_m(sp, '%');
+
if (strcasecmp(sp, localhost) == 0) {
sp = ::1;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-836-g71632a1

2009-02-12 Thread Andrew Bartlett
The branch, master has been updated
   via  71632a16977a93968b0d520a491a52f635e611a1 (commit)
  from  147a2e3440056ec30d8b386901754a58ea3947d1 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 71632a16977a93968b0d520a491a52f635e611a1
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Feb 13 10:24:16 2009 +1100

Remove auth/ntlm as a dependency of GENSEC by means of function pointers.

When starting GENSEC on the server, the auth subsystem context must be
passed in, which now includes function pointers to the key elements.

This should (when the other dependencies are fixed up) allow GENSEC to
exist as a client or server library without bundling in too much of
our server code.

Andrew Bartlett

---

Summary of changes:
 source4/auth/auth.h   |   24 +++
 source4/auth/config.mk|5 ++
 source4/auth/gensec/gensec.c  |   22 --
 source4/auth/gensec/gensec.h  |9 +++-
 source4/auth/gensec/gensec_krb5.c |2 -
 source4/auth/ntlm/auth.c  |7 +++
 source4/auth/ntlmssp/config.mk|2 +-
 source4/auth/ntlmssp/ntlmssp.c|2 -
 source4/auth/ntlmssp/ntlmssp_server.c |   21 +-
 source4/auth/samba_server_gensec.c|   73 +
 source4/kdc/kpasswdd.c|   19 +
 source4/ldap_server/ldap_bind.c   |   16 +++
 source4/rpc_server/config.mk  |2 +-
 source4/rpc_server/dcesrv_auth.c  |   16 +++
 source4/smb_server/smb/config.mk  |2 +-
 source4/smb_server/smb/negprot.c  |   36 +
 source4/smb_server/smb/sesssetup.c|   16 +++
 source4/smb_server/smb2/config.mk |2 +-
 source4/smb_server/smb2/negprot.c |   25 ++-
 source4/smb_server/smb2/sesssetup.c   |   16 +++
 source4/torture/rpc/remote_pac.c  |2 +-
 source4/utils/ntlm_auth.c |   21 +-
 22 files changed, 230 insertions(+), 110 deletions(-)
 create mode 100644 source4/auth/samba_server_gensec.c


Changeset truncated at 500 lines:

diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index e184776..0ef1e24 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -175,6 +175,20 @@ struct auth_context {
 
/* loadparm context */
struct loadparm_context *lp_ctx;
+
+   NTSTATUS (*check_password)(struct auth_context *auth_ctx,
+  TALLOC_CTX *mem_ctx,
+  const struct auth_usersupplied_info 
*user_info, 
+  struct auth_serversupplied_info 
**server_info);
+   
+   NTSTATUS (*get_challenge)(struct auth_context *auth_ctx, const uint8_t 
**_chal);
+
+   bool (*challenge_may_be_modified)(struct auth_context *auth_ctx);
+
+   NTSTATUS (*set_challenge)(struct auth_context *auth_ctx, const uint8_t 
chal[8], const char *set_by);
+   
+   
+
 };
 
 /* this structure is used by backends to determine the size of some critical 
types */
@@ -197,6 +211,8 @@ struct auth_critical_sizes {
 
 struct ldb_message;
 struct ldb_context;
+struct gensec_security;
+
 NTSTATUS auth_get_challenge(struct auth_context *auth_ctx, const uint8_t 
**_chal);
 NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
struct ldb_context *sam_ctx,
@@ -254,4 +270,12 @@ void auth_check_password_send(struct auth_context 
*auth_ctx,
  void *private_data);
 NTSTATUS auth_context_set_challenge(struct auth_context *auth_ctx, const 
uint8_t chal[8], const char *set_by);
 
+NTSTATUS samba_server_gensec_start(TALLOC_CTX *mem_ctx,
+  struct tevent_context *event_ctx,
+  struct messaging_context *msg_ctx,
+  struct loadparm_context *lp_ctx,
+  struct cli_credentials *server_credentials,
+  const char *target_service,
+  struct gensec_security **gensec_context);
+
 #endif /* _SMBAUTH_H_ */
diff --git a/source4/auth/config.mk b/source4/auth/config.mk
index baf4346..7d50509 100644
--- a/source4/auth/config.mk
+++ b/source4/auth/config.mk
@@ -15,6 +15,11 @@ auth_session_OBJ_FILES = $(addprefix $(authsrcdir)/, 
session.o)
 
 $(eval $(call 
proto_header_template,$(authsrcdir)/session_proto.h,$(auth_session_OBJ_FILES:.o=.c)))
 
+[SUBSYSTEM::samba_server_gensec]
+PUBLIC_DEPENDENCIES = CREDENTIALS GENSEC auth 
+
+samba_server_gensec_OBJ_FILES = $(addprefix $(authsrcdir)/, 
samba_server_gensec.o)
+
 [SUBSYSTEM::auth_system_session]
 PUBLIC_DEPENDENCIES = CREDENTIALS
 PRIVATE_DEPENDENCIES = auth_session LIBSAMBA-UTIL LIBSECURITY 
diff --git a/source4/auth/gensec/gensec.c 

Build status as of Fri Feb 13 00:00:02 2009

2009-02-12 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-02-12 
00:00:26.0 +
+++ /home/build/master/cache/broken_results.txt 2009-02-13 00:00:09.0 
+
@@ -1,4 +1,4 @@
-Build status as of Thu Feb 12 00:00:02 2009
+Build status as of Fri Feb 13 00:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
@@ -6,7 +6,7 @@
 ccache   29 6  0 
 ctdb 0  0  0 
 distcc   1  0  0 
-ldb  28 29 0 
+ldb  29 29 0 
 libreplace   28 11 0 
 lorikeet-heimdal 26 14 0 
 pidl 17 3  0 
@@ -16,7 +16,7 @@
 samba-gtk4  4  0 
 samba_3_X_devel 26 25 0 
 samba_3_X_test 26 23 0 
-samba_4_0_test 28 25 0 
+samba_4_0_test 28 25 1 
 smb-build27 7  0 
 talloc   29 29 0 
 tdb  27 9  0 


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-837-g99b45f7

2009-02-12 Thread Günther Deschner
The branch, master has been updated
   via  99b45f71ccb832b712af6badd28457edf351d0db (commit)
  from  71632a16977a93968b0d520a491a52f635e611a1 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 99b45f71ccb832b712af6badd28457edf351d0db
Author: Günther Deschner g...@samba.org
Date:   Fri Feb 13 01:35:35 2009 +0100

s3-netlogon: implement _netr_ServerAuthenticate3.

Guenther

---

Summary of changes:
 source3/rpc_server/srv_netlog_nt.c |   79 +--
 1 files changed, 56 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_netlog_nt.c 
b/source3/rpc_server/srv_netlog_nt.c
index 16d370c..96e1979 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -280,7 +280,8 @@ WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p,
  gets a machine password entry.  checks access rights of the host.
  **/
 
-static NTSTATUS get_md4pw(char *md4pw, const char *mach_acct, uint16 
sec_chan_type)
+static NTSTATUS get_md4pw(char *md4pw, const char *mach_acct,
+ uint16_t sec_chan_type, uint32_t *rid)
 {
struct samu *sampass = NULL;
const uint8 *pass;
@@ -376,6 +377,10 @@ static NTSTATUS get_md4pw(char *md4pw, const char 
*mach_acct, uint16 sec_chan_ty
memcpy(md4pw, pass, 16);
dump_data(5, (uint8 *)md4pw, 16);
 
+   if (rid) {
+   *rid = pdb_get_user_rid(sampass);
+   }
+
TALLOC_FREE(sampass);
 
return NT_STATUS_OK;
@@ -435,7 +440,8 @@ NTSTATUS _netr_ServerAuthenticate(pipes_struct *p,
 
status = get_md4pw((char *)p-dc-mach_pw,
   r-in.account_name,
-  r-in.secure_channel_type);
+  r-in.secure_channel_type,
+  NULL);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,(_netr_ServerAuthenticate: get_md4pw failed. Failed to 

get password for machine account %s 
@@ -478,21 +484,33 @@ NTSTATUS _netr_ServerAuthenticate(pipes_struct *p,
 }
 
 /*
- _netr_ServerAuthenticate2
+ _netr_ServerAuthenticate3
  */
 
-NTSTATUS _netr_ServerAuthenticate2(pipes_struct *p,
-  struct netr_ServerAuthenticate2 *r)
+NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p,
+  struct netr_ServerAuthenticate3 *r)
 {
NTSTATUS status;
uint32_t srv_flgs;
struct netr_Credential srv_chal_out;
+   const char *fn;
+
+   switch (p-hdr_req.opnum) {
+   case NDR_NETR_SERVERAUTHENTICATE2:
+   fn = _netr_ServerAuthenticate2;
+   break;
+   case NDR_NETR_SERVERAUTHENTICATE3:
+   fn = _netr_ServerAuthenticate3;
+   break;
+   default:
+   return NT_STATUS_INTERNAL_ERROR;
+   }
 
/* We use this as the key to store the creds: */
/* r-in.computer_name */
 
if (!p-dc || !p-dc-challenge_sent) {
-   DEBUG(0,(_netr_ServerAuthenticate2: no challenge sent to 
client %s\n,
+   DEBUG(0,(%s: no challenge sent to client %s\n, fn,
r-in.computer_name));
return NT_STATUS_ACCESS_DENIED;
}
@@ -501,19 +519,20 @@ NTSTATUS _netr_ServerAuthenticate2(pipes_struct *p,
 ((*r-in.negotiate_flags  NETLOGON_NEG_SCHANNEL) == 0) ) {
 
/* schannel must be used, but client did not offer it. */
-   DEBUG(0,(_netr_ServerAuthenticate2: schannel required but 
client failed 
+   DEBUG(0,(%s: schannel required but client failed 
to offer it. Client was %s\n,
-   r-in.account_name));
+   fn, r-in.account_name));
return NT_STATUS_ACCESS_DENIED;
}
 
status = get_md4pw((char *)p-dc-mach_pw,
   r-in.account_name,
-  r-in.secure_channel_type);
+  r-in.secure_channel_type,
+  r-out.rid);
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(0,(_netr_ServerAuthenticate2: failed to get machine 
password for 
+   DEBUG(0,(%s: failed to get machine password for 
account %s: %s\n,
-   r-in.account_name, nt_errstr(status) ));
+   fn, r-in.account_name, nt_errstr(status) ));
/* always return NT_STATUS_ACCESS_DENIED */
   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-840-g0ccdb5f

2009-02-12 Thread Andrew Bartlett
The branch, master has been updated
   via  0ccdb5f74a0cbb97f3028101ea606f00bd1f73d8 (commit)
   via  0d222a692442d01eb24b20735e6020bd2ce47738 (commit)
   via  cd6026135d3dc7eaa773c60aa168bae8f3f15502 (commit)
  from  99b45f71ccb832b712af6badd28457edf351d0db (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 0ccdb5f74a0cbb97f3028101ea606f00bd1f73d8
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Feb 13 16:56:46 2009 +1100

Remove useless invocation of messaging_init() in RPC-PAC test

commit 0d222a692442d01eb24b20735e6020bd2ce47738
Merge: cd6026135d3dc7eaa773c60aa168bae8f3f15502 
99b45f71ccb832b712af6badd28457edf351d0db
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Feb 13 16:56:35 2009 +1100

Merge branch 'master' of ssh://git.samba.org/data/git/samba into 
master-devel

commit cd6026135d3dc7eaa773c60aa168bae8f3f15502
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Feb 13 14:02:49 2009 +1100

Push sam_get_server_info_principal into the auth subsystem

This means it must be accessed via the supplied auth_context in the
GENSEC server, and should remove the hard depenceny of GENSEC on the
auth subsystem and ldb (allowing LDB not to rely on LDB is considered
a good thing, apparently)

Andrew Bartlett

---

Summary of changes:
 source4/auth/auth.h |   12 ++-
 source4/auth/gensec/config.mk   |2 +-
 source4/auth/gensec/gensec_gssapi.c |   10 +++--
 source4/auth/gensec/gensec_krb5.c   |   19 +-
 source4/auth/ntlm/auth.c|   31 
 source4/auth/ntlm/auth_sam.c|   65 ++-
 source4/auth/ntlm/config.mk |1 -
 source4/auth/sam.c  |   45 
 source4/torture/rpc/remote_pac.c|9 -
 9 files changed, 122 insertions(+), 72 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index 0ef1e24..973102d 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -123,6 +123,7 @@ struct auth_serversupplied_info
 
 struct auth_method_context;
 struct auth_check_password_request;
+struct auth_context;
 
 struct auth_operations {
const char *name;
@@ -144,6 +145,12 @@ struct auth_operations {
NTSTATUS (*check_password)(struct auth_method_context *ctx, TALLOC_CTX 
*mem_ctx,
   const struct auth_usersupplied_info 
*user_info,
   struct auth_serversupplied_info 
**server_info);
+
+   /* Lookup a 'server info' return based only on the principal */
+   NTSTATUS (*get_server_info_principal)(TALLOC_CTX *mem_ctx, 
+ struct auth_context *auth_context,
+ const char *principal,
+ struct auth_serversupplied_info 
**server_info);
 };
 
 struct auth_method_context {
@@ -187,7 +194,10 @@ struct auth_context {
 
NTSTATUS (*set_challenge)(struct auth_context *auth_ctx, const uint8_t 
chal[8], const char *set_by);

-   
+   NTSTATUS (*get_server_info_principal)(TALLOC_CTX *mem_ctx, 
+ struct auth_context *auth_context,
+ const char *principal,
+ struct auth_serversupplied_info 
**server_info);
 
 };
 
diff --git a/source4/auth/gensec/config.mk b/source4/auth/gensec/config.mk
index 3d13ce7..27cf442 100644
--- a/source4/auth/gensec/config.mk
+++ b/source4/auth/gensec/config.mk
@@ -21,7 +21,7 @@ $(eval $(call 
proto_header_template,$(gensecsrcdir)/gensec_proto.h,$(gensec_OBJ_
 [MODULE::gensec_krb5]
 SUBSYSTEM = gensec
 INIT_FUNCTION = gensec_krb5_init
-PRIVATE_DEPENDENCIES = CREDENTIALS KERBEROS auth_session auth_sam
+PRIVATE_DEPENDENCIES = CREDENTIALS KERBEROS auth_session
 # End MODULE gensec_krb5
 
 
diff --git a/source4/auth/gensec/gensec_gssapi.c 
b/source4/auth/gensec/gensec_gssapi.c
index dcfffef..aae04df 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -1290,12 +1290,14 @@ static NTSTATUS gensec_gssapi_session_info(struct 
gensec_security *gensec_securi
return NT_STATUS_NO_MEMORY;
}
 
-   if (!gensec_setting_bool(gensec_security-settings, gensec, 
require_pac, false)) {
+   if (gensec_security-auth_context  
+   !gensec_setting_bool(gensec_security-settings, gensec, 
require_pac, false)) {
DEBUG(1, (Unable to find PAC, resorting to local user 
lookup: %s\n,
  gssapi_error_string(mem_ctx, maj_stat,