[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Günther Deschner
The branch, master has been updated
   via  b8eaec6 s3-vfs: make vfswrap_llistxattr and vfswrap_flistxattr 
static.
  from  7febcb5 s3: Filter out duplicates in name_query()

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


- Log -
commit b8eaec6b666b1f0d3711540c492edd79cd02b1fe
Author: Günther Deschner g...@samba.org
Date:   Tue May 3 21:42:04 2011 +0200

s3-vfs: make vfswrap_llistxattr and vfswrap_flistxattr static.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Wed May  4 12:31:10 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/include/proto.h   |6 --
 source3/modules/vfs_default.c |4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index bb2c64b..dfe44a1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2093,12 +2093,6 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const 
char *domain,
 struct dom_sid **sids );
 NTSTATUS change_trust_account_password( const char *domain, const char 
*remote_machine);
 
-/* The following definitions come from modules/vfs_default.c  */
-
-ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char *path, 
char *list, size_t size);
-ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct 
files_struct *fsp, char *list, size_t size);
-NTSTATUS vfs_default_init(void);
-
 /* The following definitions come from param/loadparm.c  */
 
 char *lp_smb_ports(void);
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index cf6e24f..5d6b512 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1512,12 +1512,12 @@ static ssize_t vfswrap_listxattr(struct 
vfs_handle_struct *handle, const char *p
return sys_listxattr(path, list, size);
 }
 
-ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char *path, 
char *list, size_t size)
+static ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char 
*path, char *list, size_t size)
 {
return sys_llistxattr(path, list, size);
 }
 
-ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct 
files_struct *fsp, char *list, size_t size)
+static ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct 
files_struct *fsp, char *list, size_t size)
 {
return sys_flistxattr(fsp-fh-fd, list, size);
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Volker Lendecke
The branch, master has been updated
   via  d08414b s3: Properly deal with exited winbind children
  from  b8eaec6 s3-vfs: make vfswrap_llistxattr and vfswrap_flistxattr 
static.

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


- Log -
commit d08414b6799747f224ba02300585c8b15ac6bc0e
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 12:11:04 2011 +0200

s3: Properly deal with exited winbind children

When a winbind child exits, we need to immediately close the socket. If not,
the next request to that child will be sent to a socket without a listener,
leading to a failed request. This failed request will then trigger a proper
re-init.

This patch avoids the one failed request.

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Wed May  4 13:32:16 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/winbindd/winbindd_dual.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 088353d..1078f8d 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -510,6 +510,11 @@ void winbind_child_died(pid_t pid)
 
DLIST_REMOVE(winbindd_children, child);
child-pid = 0;
+
+   if (child-sock != -1) {
+   close(child-sock);
+   child-sock = -1;
+   }
 }
 
 /* Ensure any negative cache entries with the netbios or realm names are 
removed. */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-04 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  2f6e543 s3: Properly deal with exited winbind children
  from  64e7b7b s3: Filter out duplicates in name_query()

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


- Log -
commit 2f6e5436a707f4eed15130dff664327352c776fa
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 12:11:04 2011 +0200

s3: Properly deal with exited winbind children

When a winbind child exits, we need to immediately close the socket. If not,
the next request to that child will be sent to a socket without a listener,
leading to a failed request. This failed request will then trigger a proper
re-init.

This patch avoids the one failed request.

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Wed May  4 13:32:16 CEST 2011 on sn-devel-104
(cherry picked from commit d08414b6799747f224ba02300585c8b15ac6bc0e)

---

Summary of changes:
 source3/winbindd/winbindd_dual.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index ebafe8f..d354f34 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -511,6 +511,11 @@ void winbind_child_died(pid_t pid)
 
DLIST_REMOVE(winbindd_children, child);
child-pid = 0;
+
+   if (child-sock != -1) {
+   close(child-sock);
+   child-sock = -1;
+   }
 }
 
 /* Ensure any negative cache entries with the netbios or realm names are 
removed. */


-- 
Samba Shared Repository


[SCM] CTDB repository - branch master updated - ctdb-1.10-196-gce6409d

2011-05-04 Thread Michael Adam
The branch, master has been updated
   via  ce6409dc7d059701f0fe4b57e7c05c38c66629c5 (commit)
   via  ffbff1affed8301831387e23b4f8f824d9f78e20 (commit)
   via  991ea66e5ed0eb7ab256dc8e3118dc78462d4752 (commit)
   via  d91e80c698a7706460e9ee74bd4f5a9ab0a7b9b1 (commit)
   via  992baa4215bfc1b29fd153ccb7c42bb0cb66fa4f (commit)
   via  2ed3603274cd38dde4ae98eef653e9a9de631eb5 (commit)
   via  efcf2815711cd5371633614fb91273bd0a786da0 (commit)
   via  2b5cb0841fd813cd54be170c305a828885e0f038 (commit)
  from  6a74515f0a1e24d97cee3ba05d89133aac7ad2b7 (commit)

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


- Log -
commit ce6409dc7d059701f0fe4b57e7c05c38c66629c5
Author: Michael Adam ob...@samba.org
Date:   Wed May 4 14:28:26 2011 +0200

packaging: add ltdbtool and its manpage to the RPM

commit ffbff1affed8301831387e23b4f8f824d9f78e20
Author: Michael Adam ob...@samba.org
Date:   Wed May 4 14:25:48 2011 +0200

install the ltdbtool manpage with make install

commit 991ea66e5ed0eb7ab256dc8e3118dc78462d4752
Author: Michael Adam ob...@samba.org
Date:   Wed May 4 13:44:59 2011 +0200

install ltdbtool with make install

commit d91e80c698a7706460e9ee74bd4f5a9ab0a7b9b1
Author: Michael Adam ob...@samba.org
Date:   Wed May 4 13:44:10 2011 +0200

build ltdbtool in make all

commit 992baa4215bfc1b29fd153ccb7c42bb0cb66fa4f
Author: Gregor Beck gb...@sernet.de
Date:   Wed May 4 14:17:04 2011 +0200

ltdbtool: add manpage html + roff

Signed-off-by: Michael Adam ob...@samba.org

commit 2ed3603274cd38dde4ae98eef653e9a9de631eb5
Author: Gregor Beck gb...@sernet.de
Date:   Wed May 4 14:14:54 2011 +0200

ltdbtool: add manpage

Signed-off-by: Michael Adam ob...@samba.org

commit efcf2815711cd5371633614fb91273bd0a786da0
Author: Gregor Beck gb...@sernet.de
Date:   Thu Apr 14 12:51:59 2011 +0200

add ltdbtool - a standalone ltdb tool

This this is a tool to handle (dump and convert) ctdb's local tdb
copies (ltdbs) without connecting to a ctdb daemon.

It can be used to

* dump the contents of a ltdb, printing
  the ctdb record header information

* dump a non-clustered tdb database (like tdbdump)

* convert between an ltdb and a non-clustered tdb
  (adding or removing ctdb headers)

* convert between 64 and 32 bit ltdbs
  (the ctdb record headers differ by 4 bytes of padding)

usage: bin/ltdbtool dump [-p] [-s{0|32|64}] idb
   bin/ltdbtool convert [-s{0|32|64}] [-o{0|32|64}] idb odb

Pair-Programmed-With: Michael Adam ob...@samba.org

commit 2b5cb0841fd813cd54be170c305a828885e0f038
Author: Gregor Beck gb...@sernet.de
Date:   Thu Apr 14 12:55:57 2011 +0200

ctdb catdb: fix escaping of '' and '\'

Signed-off-by: Michael Adam ob...@samba.org

---

Summary of changes:
 Makefile.in|   11 +-
 client/ctdb_client.c   |2 +-
 doc/ltdbtool.1 |  258 ++
 doc/ltdbtool.1.html|   84 ++
 doc/ltdbtool.1.xml |  230 +++
 packaging/RPM/ctdb.spec.in |2 +
 tools/ltdbtool.c   |  377 
 7 files changed, 961 insertions(+), 3 deletions(-)
 create mode 100644 doc/ltdbtool.1
 create mode 100644 doc/ltdbtool.1.html
 create mode 100644 doc/ltdbtool.1.xml
 create mode 100644 tools/ltdbtool.c


Changeset truncated at 500 lines:

diff --git a/Makefile.in b/Makefile.in
index 6bbf616..aec64e1 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -72,7 +72,7 @@ TEST_BINS=tests/bin/ctdb_bench tests/bin/ctdb_fetch 
tests/bin/ctdb_fetch_one \
tests/bin/ctdb_traverse tests/bin/rb_test tests/bin/ctdb_transaction \
@INFINIBAND_BINS@
 
-BINS = bin/ctdb @CTDB_SCSI_IO@ bin/smnotify bin/ping_pong
+BINS = bin/ctdb @CTDB_SCSI_IO@ bin/smnotify bin/ping_pong bin/ltdbtool
 SBINS = bin/ctdbd
 
 DIRS = lib bin tests/bin
@@ -123,6 +123,10 @@ bin/ctdb: $(CTDB_CLIENT_OBJ) tools/ctdb.o 
tools/ctdb_vacuum.o libctdb/libctdb.a
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ tools/ctdb.o tools/ctdb_vacuum.o 
$(CTDB_CLIENT_OBJ) $(LIB_FLAGS) libctdb/libctdb.a
 
+bin/ltdbtool: tools/ltdbtool.o @TDB_OBJ@
+   @echo Linking $@
+   @$(CC) $(CFLAGS) -o $@ $+
+
 bin/smnotify: utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o 
utils/smnotify/smnotify.o $(POPT_OBJ)
@echo Linking $@
@$(CC) $(CFLAGS) -o $@ utils/smnotify/smnotify.o 
utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o $(POPT_OBJ) $(LIB_FLAGS)
@@ -198,7 +202,8 @@ tests/bin/ibwrapper_test: $(CTDB_CLIENT_OBJ) 
ib/ibwrapper_test.o
 
 doc: doc/ctdb.1 doc/ctdb.1.html \
doc/ctdbd.1 doc/ctdbd.1.html \
-   doc/onnode.1 doc/onnode.1.html
+   doc/onnode.1 doc/onnode.1.html \
+   doc/ltdbtool.1 

[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Volker Lendecke
The branch, master has been updated
   via  3e21151 RHEL-CTDB: Build vfs_gpfs_hsm_notify
   via  3f68b43 vfs_gpfs: Properly notify the offline-online changes
   via  41bde55 vfs_gpfs: Block sendfile for offline files
   via  2329fb5 vfs_gpfs: Store the winattrs in st.vfs_private
  from  d08414b s3: Properly deal with exited winbind children

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


- Log -
commit 3e211510034dd3854017e1b35ef5e1964085df5d
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 16:02:15 2011 +0200

RHEL-CTDB: Build vfs_gpfs_hsm_notify

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Wed May  4 17:12:14 CEST 2011 on sn-devel-104

commit 3f68b43dd56b8f338a18074741162bf6437ae78d
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 15:48:27 2011 +0200

vfs_gpfs: Properly notify the offline-online changes

This needs to be a separate module that cooperates with vfs_gpfs. If 
aio_fork
is used early in the module chain it (correctly) does not propagate the aio 
ops
down, so vfs_gpfs does not see them. This slim module must come early in the
chain for notifies to work properly.

commit 41bde55821a6c18ace24330aede8d4928215e658
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 15:47:42 2011 +0200

vfs_gpfs: Block sendfile for offline files

commit 2329fb56a701804585d866817586b4d567966b92
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 15:42:54 2011 +0200

vfs_gpfs: Store the winattrs in st.vfs_private

This avoids a considerable amount of gpfs_winattr calls

---

Summary of changes:
 packaging/RHEL-CTDB/samba.spec.tmpl   |3 +-
 source3/Makefile.in   |5 ++
 source3/configure.in  |2 +
 source3/modules/vfs_gpfs.c|   29 +++--
 source3/modules/vfs_gpfs_hsm_notify.c |  110 +
 5 files changed, 143 insertions(+), 6 deletions(-)
 create mode 100644 source3/modules/vfs_gpfs_hsm_notify.c


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl 
b/packaging/RHEL-CTDB/samba.spec.tmpl
index 5e80840..3a4ec77 100644
--- a/packaging/RHEL-CTDB/samba.spec.tmpl
+++ b/packaging/RHEL-CTDB/samba.spec.tmpl
@@ -246,7 +246,7 @@ CFLAGS=$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE ./configure \
 --without-smbwrapper \
--with-pam \
--with-quotas \
-   --with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm \
+   
--with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm,vfs_gpfs_hsm_notify
 \
--with-syslog \
--with-utmp \
--with-cluster-support \
@@ -482,6 +482,7 @@ exit 0
 %{_libarchdir}/samba/vfs/fileid.so
 %{_libarchdir}/samba/vfs/full_audit.so
 %{_libarchdir}/samba/vfs/gpfs.so
+%{_libarchdir}/samba/vfs/gpfs_prefetch_hsm_notify.so
 %{_libarchdir}/samba/vfs/linux_xfs_sgid.so
 %{_libarchdir}/samba/vfs/netatalk.so
 %{_libarchdir}/samba/vfs/preopen.so
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 9b45180..c7d2636 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -830,6 +830,7 @@ VFS_CACHEPRIME_OBJ = modules/vfs_cacheprime.o
 VFS_PREALLOC_OBJ = modules/vfs_prealloc.o
 VFS_COMMIT_OBJ = modules/vfs_commit.o
 VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o
+VFS_GPFS_HSM_NOTIFY_OBJ = modules/vfs_gpfs_hsm_notify.o
 VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
 VFS_READAHEAD_OBJ = modules/vfs_readahead.o
 VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
@@ -2971,6 +2972,10 @@ bin/gpfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_OBJ)
@echo Building plugin $@
@$(SHLD_MODULE) $(VFS_GPFS_OBJ)
 
+bin/gpfs_hsm_notify.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_HSM_NOTIFY_OBJ)
+   @echo Building plugin $@
+   @$(SHLD_MODULE) $(VFS_GPFS_HSM_NOTIFY_OBJ)
+
 bin/notify_fam.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NOTIFY_FAM_OBJ)
@echo Building plugin $@
@$(SHLD_MODULE) $(VFS_NOTIFY_FAM_OBJ) @SMB_FAM_LIBS@
diff --git a/source3/configure.in b/source3/configure.in
index 67c440d..f9263f6 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1117,6 +1117,7 @@ AC_CHECK_HEADERS(gpfs_gpl.h)
 if test x$ac_cv_header_gpfs_gpl_h = xyes; then
 AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL headers are available])
 default_shared_modules=$default_shared_modules vfs_gpfs
+default_shared_modules=$default_shared_modules vfs_gpfs_hsm_notify
 fi
 
 #
@@ -6882,6 +6883,7 @@ SMB_MODULE(vfs_cacheprime, \$(VFS_CACHEPRIME_OBJ), 
bin/cacheprime.$SHLIBEXT, V
 SMB_MODULE(vfs_prealloc, \$(VFS_PREALLOC_OBJ), bin/prealloc.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_commit, \$(VFS_COMMIT_OBJ), bin/commit.$SHLIBEXT, VFS)
 SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), bin/gpfs.$SHLIBEXT, VFS)
+SMB_MODULE(vfs_gpfs_hsm_notify, 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-04 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  ce095f4 RHEL-CTDB: Build vfs_gpfs_hsm_notify
   via  a250a9c vfs_gpfs: Properly notify the offline-online changes
   via  c2c2953 vfs_gpfs: Block sendfile for offline files (cherry picked 
from commit 41bde55821a6c18ace24330aede8d4928215e658)
   via  03a9d9d vfs_gpfs: Store the winattrs in st.vfs_private
  from  2f6e543 s3: Properly deal with exited winbind children

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


- Log -
commit ce095f4eb7c9e8814bc4c3c8177a44a3eabd838c
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 16:02:15 2011 +0200

RHEL-CTDB: Build vfs_gpfs_hsm_notify

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Wed May  4 17:12:14 CEST 2011 on sn-devel-104
(cherry picked from commit 3e211510034dd3854017e1b35ef5e1964085df5d)

commit a250a9ca068b94267888aa406c14c43a6642eb14
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 15:48:27 2011 +0200

vfs_gpfs: Properly notify the offline-online changes

This needs to be a separate module that cooperates with vfs_gpfs. If 
aio_fork
is used early in the module chain it (correctly) does not propagate the aio 
ops
down, so vfs_gpfs does not see them. This slim module must come early in the
chain for notifies to work properly.
(cherry picked from commit 3f68b43dd56b8f338a18074741162bf6437ae78d)

commit c2c29533fc4a7467130dff058224949e001e
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 15:47:42 2011 +0200

vfs_gpfs: Block sendfile for offline files
(cherry picked from commit 41bde55821a6c18ace24330aede8d4928215e658)

commit 03a9d9dbce61ceb2506a0f193d6407c7d8f4c7e6
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 15:42:54 2011 +0200

vfs_gpfs: Store the winattrs in st.vfs_private

This avoids a considerable amount of gpfs_winattr calls
(cherry picked from commit 2329fb56a701804585d866817586b4d567966b92)

---

Summary of changes:
 packaging/RHEL-CTDB/samba.spec.tmpl   |3 +-
 source3/Makefile.in   |5 ++
 source3/configure.in  |2 +
 source3/modules/vfs_gpfs.c|   29 +++--
 source3/modules/vfs_gpfs_hsm_notify.c |  110 +
 5 files changed, 143 insertions(+), 6 deletions(-)
 create mode 100644 source3/modules/vfs_gpfs_hsm_notify.c


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl 
b/packaging/RHEL-CTDB/samba.spec.tmpl
index 5e80840..3a4ec77 100644
--- a/packaging/RHEL-CTDB/samba.spec.tmpl
+++ b/packaging/RHEL-CTDB/samba.spec.tmpl
@@ -246,7 +246,7 @@ CFLAGS=$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE ./configure \
 --without-smbwrapper \
--with-pam \
--with-quotas \
-   --with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm \
+   
--with-shared-modules=idmap_rid,idmap_ad,idmap_tdb2,vfs_gpfs,vfs_tsmsm,vfs_gpfs_hsm_notify
 \
--with-syslog \
--with-utmp \
--with-cluster-support \
@@ -482,6 +482,7 @@ exit 0
 %{_libarchdir}/samba/vfs/fileid.so
 %{_libarchdir}/samba/vfs/full_audit.so
 %{_libarchdir}/samba/vfs/gpfs.so
+%{_libarchdir}/samba/vfs/gpfs_prefetch_hsm_notify.so
 %{_libarchdir}/samba/vfs/linux_xfs_sgid.so
 %{_libarchdir}/samba/vfs/netatalk.so
 %{_libarchdir}/samba/vfs/preopen.so
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 53886e1..db29a83 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -820,6 +820,7 @@ VFS_CACHEPRIME_OBJ = modules/vfs_cacheprime.o
 VFS_PREALLOC_OBJ = modules/vfs_prealloc.o
 VFS_COMMIT_OBJ = modules/vfs_commit.o
 VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o
+VFS_GPFS_HSM_NOTIFY_OBJ = modules/vfs_gpfs_hsm_notify.o
 VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
 VFS_READAHEAD_OBJ = modules/vfs_readahead.o
 VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
@@ -2967,6 +2968,10 @@ bin/gpfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_OBJ)
@echo Building plugin $@
@$(SHLD_MODULE) $(VFS_GPFS_OBJ)
 
+bin/gpfs_hsm_notify.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_HSM_NOTIFY_OBJ)
+   @echo Building plugin $@
+   @$(SHLD_MODULE) $(VFS_GPFS_HSM_NOTIFY_OBJ)
+
 bin/notify_fam.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NOTIFY_FAM_OBJ)
@echo Building plugin $@
@$(SHLD_MODULE) $(VFS_NOTIFY_FAM_OBJ) @SMB_FAM_LIBS@
diff --git a/source3/configure.in b/source3/configure.in
index 05a4ae1..d8c59b6 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1117,6 +1117,7 @@ AC_CHECK_HEADERS(gpfs_gpl.h)
 if test x$ac_cv_header_gpfs_gpl_h = xyes; then
 AC_DEFINE(HAVE_GPFS,1,[Whether GPFS GPL headers are available])
 default_shared_modules=$default_shared_modules vfs_gpfs
+default_shared_modules=$default_shared_modules vfs_gpfs_hsm_notify
 fi
 
 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-04 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  55cad00 Always build before commit ... :-) (cherry picked from 
commit d4d3d7383a9e3c2c0910a848f33755ca54c32b99)
  from  ce095f4 RHEL-CTDB: Build vfs_gpfs_hsm_notify

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


- Log -
commit 55cad002017d25a69de826a7af518c6fcc016d02
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 17:48:12 2011 +0200

Always build before commit ... :-)
(cherry picked from commit d4d3d7383a9e3c2c0910a848f33755ca54c32b99)

---

Summary of changes:
 packaging/RHEL-CTDB/samba.spec.tmpl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl 
b/packaging/RHEL-CTDB/samba.spec.tmpl
index 3a4ec77..479e985 100644
--- a/packaging/RHEL-CTDB/samba.spec.tmpl
+++ b/packaging/RHEL-CTDB/samba.spec.tmpl
@@ -482,7 +482,7 @@ exit 0
 %{_libarchdir}/samba/vfs/fileid.so
 %{_libarchdir}/samba/vfs/full_audit.so
 %{_libarchdir}/samba/vfs/gpfs.so
-%{_libarchdir}/samba/vfs/gpfs_prefetch_hsm_notify.so
+%{_libarchdir}/samba/vfs/gpfs_hsm_notify.so
 %{_libarchdir}/samba/vfs/linux_xfs_sgid.so
 %{_libarchdir}/samba/vfs/netatalk.so
 %{_libarchdir}/samba/vfs/preopen.so


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-04 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  cc153ab s3-vfs: make vfswrap_llistxattr and vfswrap_flistxattr 
static.
  from  55cad00 Always build before commit ... :-) (cherry picked from 
commit d4d3d7383a9e3c2c0910a848f33755ca54c32b99)

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


- Log -
commit cc153ab9cbbc8c0e7328059272a7f287ea95a639
Author: Günther Deschner g...@samba.org
Date:   Tue May 3 21:42:04 2011 +0200

s3-vfs: make vfswrap_llistxattr and vfswrap_flistxattr static.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Wed May  4 12:31:10 CEST 2011 on sn-devel-104
(cherry picked from commit b8eaec6b666b1f0d3711540c492edd79cd02b1fe)

---

Summary of changes:
 source3/include/proto.h   |6 --
 source3/modules/vfs_default.c |4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index cfc075d..766c744 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2213,12 +2213,6 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const 
char *domain,
 struct dom_sid **sids );
 NTSTATUS change_trust_account_password( const char *domain, const char 
*remote_machine);
 
-/* The following definitions come from modules/vfs_default.c  */
-
-ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char *path, 
char *list, size_t size);
-ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct 
files_struct *fsp, char *list, size_t size);
-NTSTATUS vfs_default_init(void);
-
 /* The following definitions come from param/loadparm.c  */
 
 char *lp_smb_ports(void);
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index cf6e24f..5d6b512 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1512,12 +1512,12 @@ static ssize_t vfswrap_listxattr(struct 
vfs_handle_struct *handle, const char *p
return sys_listxattr(path, list, size);
 }
 
-ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char *path, 
char *list, size_t size)
+static ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char 
*path, char *list, size_t size)
 {
return sys_llistxattr(path, list, size);
 }
 
-ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct 
files_struct *fsp, char *list, size_t size)
+static ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct 
files_struct *fsp, char *list, size_t size)
 {
return sys_flistxattr(fsp-fh-fd, list, size);
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Günther Deschner
The branch, master has been updated
   via  0d1b2d2 s3-waf: add vfs_gpfs_hsm_notify to the build.
  from  3e21151 RHEL-CTDB: Build vfs_gpfs_hsm_notify

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


- Log -
commit 0d1b2d2033e9cc33accea29a4c3a8fafd3d75aa2
Author: Günther Deschner g...@samba.org
Date:   Wed May 4 18:01:04 2011 +0200

s3-waf: add vfs_gpfs_hsm_notify to the build.

Volker, can you please check this is correct ?

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Wed May  4 19:03:45 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/modules/wscript_build |8 
 source3/wscript   |6 ++
 2 files changed, 14 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build
index 201610e..ff7163f 100644
--- a/source3/modules/wscript_build
+++ b/source3/modules/wscript_build
@@ -30,6 +30,7 @@ VFS_CACHEPRIME_SRC = 'vfs_cacheprime.c'
 VFS_PREALLOC_SRC = 'vfs_prealloc.c'
 VFS_COMMIT_SRC = 'vfs_commit.c'
 VFS_GPFS_SRC = 'vfs_gpfs.c gpfs.c'
+VFS_GPFS_HSM_NOTIFY_SRC = 'vfs_gpfs_hsm_notify.c'
 VFS_NOTIFY_FAM_SRC = 'vfs_notify_fam.c'
 VFS_READAHEAD_SRC = 'vfs_readahead.c'
 VFS_TSMSM_SRC = 'vfs_tsmsm.c'
@@ -280,6 +281,13 @@ bld.SAMBA3_MODULE('vfs_gpfs',
  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_gpfs'),
  enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_gpfs'))
 
+bld.SAMBA3_MODULE('vfs_gpfs_hsm_notify',
+ subsystem='vfs',
+ source=VFS_GPFS_HSM_NOTIFY_SRC,
+ init_function='',
+ 
internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_gpfs_hsm_notify'),
+ enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_gpfs_hsm_notify'))
+
 bld.SAMBA3_MODULE('vfs_notify_fam',
  subsystem='vfs',
  source=VFS_NOTIFY_FAM_SRC,
diff --git a/source3/wscript b/source3/wscript
index 78ff40c..55b62d1 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1676,6 +1676,9 @@ main() {
 Logs.warn(pthreadpool support cannot be enabled when pthread 
support was not found)
 conf.undefine('WITH_PTHREADPOOL')
 
+if conf.CHECK_HEADERS('gpfs_gpl.h'):
+conf.DEFINE('HAVE_GPFS', '1')
+
 default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam
   auth_sam auth_unix auth_winbind auth_wbc 
auth_server
   auth_domain auth_builtin vfs_default
@@ -1716,6 +1719,9 @@ main() {
 if conf.CONFIG_SET('DARWINOS'):
default_shared_modules.extend(TO_LIST('charset_macosxfs'))
 
+if conf.CONFIG_SET('HAVE_GPFS'):
+   default_shared_modules.extend(TO_LIST('vfs_gpfs vfs_gpfs_hsm_notify'))
+
 explicit_shared_modules = TO_LIST(Options.options.shared_modules, 
delimiter=',')
 explicit_static_modules = TO_LIST(Options.options.static_modules, 
delimiter=',')
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Jeremy Allison
The branch, master has been updated
   via  54727f9 Remove unused function parse_add_domuser().
  from  0d1b2d2 s3-waf: add vfs_gpfs_hsm_notify to the build.

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


- Log -
commit 54727f93163f1529eb78dfab5ac605e138391797
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 12:55:42 2011 -0700

Remove unused function parse_add_domuser().

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Wed May  4 20:05:42 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/winbindd/winbindd_proto.h |1 -
 source3/winbindd/winbindd_util.c  |   25 -
 2 files changed, 0 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_proto.h 
b/source3/winbindd/winbindd_proto.h
index d0619f6..ab61223 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -392,7 +392,6 @@ struct winbindd_domain *find_lookup_domain_from_name(const 
char *domain_name);
 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
  char **domain, char **user);
-void parse_add_domuser(void *buf, char *domuser, int *len);
 bool canonicalize_username(fstring username_inout, fstring domain, fstring 
user);
 void fill_domain_username(fstring name, const char *domain, const char *user, 
bool can_assume);
 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index 9fbc778..63cb2d2 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -894,31 +894,6 @@ bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const 
char *domuser,
return ((*domain != NULL)  (*user != NULL));
 }
 
-/* add a domain user name to a buffer */
-void parse_add_domuser(void *buf, char *domuser, int *len)
-{
-   fstring domain;
-   char *p, *user;
-
-   user = domuser;
-   p = strchr(domuser, *lp_winbind_separator());
-
-   if (p) {
-
-   fstrcpy(domain, domuser);
-   domain[PTR_DIFF(p, domuser)] = 0;
-   p++;
-
-   if (assume_domain(domain)) {
-
-   user = p;
-   *len -= (PTR_DIFF(p, domuser));
-   }
-   }
-
-   safe_strcpy((char *)buf, user, *len);
-}
-
 /* Ensure an incoming username from NSS is fully qualified. Replace the
incoming fstring with DOMAIN separator user. Returns the same
values as parse_domain_user() but also replaces the incoming username.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-04 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  1766905 Remove unused function parse_add_domuser().
  from  cc153ab s3-vfs: make vfswrap_llistxattr and vfswrap_flistxattr 
static.

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


- Log -
commit 17669059110b65b5257fde0ce6262370c7184a5b
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 12:55:42 2011 -0700

Remove unused function parse_add_domuser().

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Wed May  4 20:05:42 CEST 2011 on sn-devel-104
(cherry picked from commit 54727f93163f1529eb78dfab5ac605e138391797)

---

Summary of changes:
 source3/winbindd/winbindd_proto.h |1 -
 source3/winbindd/winbindd_util.c  |   25 -
 2 files changed, 0 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_proto.h 
b/source3/winbindd/winbindd_proto.h
index d0619f6..ab61223 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -392,7 +392,6 @@ struct winbindd_domain *find_lookup_domain_from_name(const 
char *domain_name);
 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
  char **domain, char **user);
-void parse_add_domuser(void *buf, char *domuser, int *len);
 bool canonicalize_username(fstring username_inout, fstring domain, fstring 
user);
 void fill_domain_username(fstring name, const char *domain, const char *user, 
bool can_assume);
 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index 9fbc778..63cb2d2 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -894,31 +894,6 @@ bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const 
char *domuser,
return ((*domain != NULL)  (*user != NULL));
 }
 
-/* add a domain user name to a buffer */
-void parse_add_domuser(void *buf, char *domuser, int *len)
-{
-   fstring domain;
-   char *p, *user;
-
-   user = domuser;
-   p = strchr(domuser, *lp_winbind_separator());
-
-   if (p) {
-
-   fstrcpy(domain, domuser);
-   domain[PTR_DIFF(p, domuser)] = 0;
-   p++;
-
-   if (assume_domain(domain)) {
-
-   user = p;
-   *len -= (PTR_DIFF(p, domuser));
-   }
-   }
-
-   safe_strcpy((char *)buf, user, *len);
-}
-
 /* Ensure an incoming username from NSS is fully qualified. Replace the
incoming fstring with DOMAIN separator user. Returns the same
values as parse_domain_user() but also replaces the incoming username.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Volker Lendecke
The branch, master has been updated
   via  deba880 s3-torture: Add a test for notify upon readx
   via  a491e8e Always build before commit ... :-)
  from  54727f9 Remove unused function parse_add_domuser().

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


- Log -
commit deba880986b1029fa059fcfba9b2a72abf598a9b
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 17:45:34 2011 +0200

s3-torture: Add a test for notify upon readx

This makes sure that when a file is brought online by a read call
we notify the client for FILE_NOTIFY_CHANGE_ATTRIBUTES.

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Wed May  4 21:09:22 CEST 2011 on sn-devel-104

commit a491e8e8d33baac4c376591b932e06ecb39b7932
Author: Volker Lendecke v...@samba.org
Date:   Wed May 4 17:48:12 2011 +0200

Always build before commit ... :-)

---

Summary of changes:
 packaging/RHEL-CTDB/samba.spec.tmpl  |2 +-
 source3/Makefile.in  |1 +
 source3/torture/proto.h  |1 +
 source3/torture/test_notify_online.c |  293 ++
 source3/torture/torture.c|9 +-
 source3/wscript_build|1 +
 6 files changed, 305 insertions(+), 2 deletions(-)
 create mode 100644 source3/torture/test_notify_online.c


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL-CTDB/samba.spec.tmpl 
b/packaging/RHEL-CTDB/samba.spec.tmpl
index 3a4ec77..479e985 100644
--- a/packaging/RHEL-CTDB/samba.spec.tmpl
+++ b/packaging/RHEL-CTDB/samba.spec.tmpl
@@ -482,7 +482,7 @@ exit 0
 %{_libarchdir}/samba/vfs/fileid.so
 %{_libarchdir}/samba/vfs/full_audit.so
 %{_libarchdir}/samba/vfs/gpfs.so
-%{_libarchdir}/samba/vfs/gpfs_prefetch_hsm_notify.so
+%{_libarchdir}/samba/vfs/gpfs_hsm_notify.so
 %{_libarchdir}/samba/vfs/linux_xfs_sgid.so
 %{_libarchdir}/samba/vfs/netatalk.so
 %{_libarchdir}/samba/vfs/preopen.so
diff --git a/source3/Makefile.in b/source3/Makefile.in
index c7d2636..bc5e767 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1228,6 +1228,7 @@ SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o 
torture/scanner.o torture/uta
torture/nbench.o \
torture/test_async_echo.o \
torture/test_smbsock_any_connect.o \
+   torture/test_notify_online.o \
torture/test_addrchange.o \
torture/test_case_insensitive.o \
torture/test_posix_append.o
diff --git a/source3/torture/proto.h b/source3/torture/proto.h
index a45aa15..e40e44c 100644
--- a/source3/torture/proto.h
+++ b/source3/torture/proto.h
@@ -87,5 +87,6 @@ bool run_nbench2(int dummy);
 bool run_async_echo(int dummy);
 bool run_smb_any_connect(int dummy);
 bool run_addrchange(int dummy);
+bool run_notify_online(int dummy);
 
 #endif /* __TORTURE_H__ */
diff --git a/source3/torture/test_notify_online.c 
b/source3/torture/test_notify_online.c
new file mode 100644
index 000..a56cc11
--- /dev/null
+++ b/source3/torture/test_notify_online.c
@@ -0,0 +1,293 @@
+/*
+   Unix SMB/CIFS implementation.
+   Make sure that for offline files pread and pwrite trigger a notify
+   Copyright (C) Volker Lendecke 2011
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see http://www.gnu.org/licenses/.
+*/
+
+#include includes.h
+#include torture/proto.h
+#include libcli/security/security.h
+#include lib/util/tevent_ntstatus.h
+
+extern char *test_filename;
+
+struct notify_online_state {
+   struct tevent_context *ev;
+   struct cli_state *cli;
+   uint16_t dnum;
+   const char *fname;
+   uint16_t fnum;
+   bool got_notify;
+};
+
+static void notify_online_opened_dir(struct tevent_req *subreq);
+static void notify_online_notify_callback(struct tevent_req *subreq);
+static void notify_online_opened_file(struct tevent_req *subreq);
+static void notify_online_sent_read(struct tevent_req *subreq);
+static void notify_online_sent_closefile(struct tevent_req *subreq);
+static void notify_online_waited(struct tevent_req *subreq);
+static void notify_online_sent_closedir(struct tevent_req *subreq);
+
+static struct tevent_req *notify_online_send(
+   TALLOC_CTX *mem_ctx, struct tevent_context *ev,
+   struct cli_state *cli, const char *dname, const 

[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Jeremy Allison
The branch, master has been updated
   via  ff215f5 I added them, so I get to kill them :-). Finally remove all 
uses of safe_strcpy and safe_strcat. Change to strlcpy, strlcat.
   via  8380835 Fix warning messages caused by addition of null check in 
fstrcpy macro.
   via  df023b8 Tidy up some missing checks for NULL in strlcpy.
   via  a3e913a Add in bufflen limit when storing NetBIOS names. Remove 
safe_strcpy.
   via  6f7c4a0 Convert safe_strXX to strlXXX. Clean up off-by-ones.
   via  0dcc75f Remove magic numbers. Standardize on macro. Move from 
safe_strcat to strlcat.
   via  8ff244e Cope with +1 change on moving from safe_strcat to strlcat.
   via  2938fe6 Fold null terminator into listlen length, change to strlcpy.
   via  e466792 Fix the only place we reply on the NULL handling for the 
source in safe_strcpy.
   via  1858201 Fix off-by-one when used with safe_strcpy.
   via  5c53d63 sasl_secret_t ends in a char [1] size. This means the extra 
character is implicit in the safe_strcpy. When changing to strlcpy ensure we 
allocate an extra char for it. This fixes a bug where secret-len+1 used with 
safe_strcpy could actually write into secret-len+2.
   via  cabd9e7 Simple +1 changes in hardcoded lengths when changing from 
safe_strcpy to strlcpy.
   via  265338c BUGFIX when converting from safe_strcpy to strlcpy.
   via  5fa6f39 Remove overmalloc_safe_strcpy - can be simple strlcpy.
   via  a291508 Remove obvious use of safe_strcpy + safe_strcat - strlcpy 
+ strlcat.
   via  0c464df Change safe_strcpy_base to strlcpy_base. Note the size 
doesn't change here as the original macro auto-added the -1.
   via  017e0c8 Fix simple uses of safe_strcpy - strlcpy. Easy ones where 
we just remove -1.
  from  deba880 s3-torture: Add a test for notify upon readx

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


- Log -
commit ff215f5c89c91a22c910400c8ac81d82d7459ba0
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 16:43:27 2011 -0700

I added them, so I get to kill them :-). Finally remove all uses of 
safe_strcpy and safe_strcat. Change to strlcpy, strlcat.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Wed May  4 22:14:14 CEST 2011 on sn-devel-104

commit 8380835fc6de38706d9af29dc7f0fa4cec4f9c90
Author: Jeremy Allison j...@samba.org
Date:   Wed May 4 11:38:26 2011 -0700

Fix warning messages caused by addition of null check in fstrcpy macro.

commit df023b8657cab232df88d3656aa5d87676bb7254
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 16:42:17 2011 -0700

Tidy up some missing checks for NULL in strlcpy.

commit a3e913ae8bfaa88f5b571f3347f3357a9ff02ed1
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 14:52:01 2011 -0700

Add in bufflen limit when storing NetBIOS names. Remove safe_strcpy.

commit 6f7c4a0539844d448b4ef7e6c4767b48a9f508f4
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 14:51:25 2011 -0700

Convert safe_strXX to strlXXX. Clean up off-by-ones.

commit 0dcc75f2df9d9e151f97448e54a34f2899657490
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 14:08:27 2011 -0700

Remove magic numbers. Standardize on macro. Move from safe_strcat to 
strlcat.

commit 8ff244ec2d0a57bc4cd9dbbf1f14dea42ae9a068
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 14:06:32 2011 -0700

Cope with +1 change on moving from safe_strcat to strlcat.

commit 2938fe6f90471e8fabf583a5eb585597381df97d
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 14:15:04 2011 -0700

Fold null terminator into listlen length, change to strlcpy.

commit e4667926ce752775e9ba1108c4cb41d6f97a04fa
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 14:01:20 2011 -0700

Fix the only place we reply on the NULL handling for the source in 
safe_strcpy.

commit 18582016d96e3f41f8828f0539969678ad7d233e
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 13:57:30 2011 -0700

Fix off-by-one when used with safe_strcpy.

commit 5c53d63348882b17f16bed0cc41f1489dcd6cf66
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 13:53:30 2011 -0700

sasl_secret_t ends in a char [1] size. This means the extra character is 
implicit in the safe_strcpy. When changing to strlcpy ensure we allocate an 
extra char for it. This fixes a bug where secret-len+1 used with safe_strcpy 
could actually write into secret-len+2.

commit cabd9e70e2f3ce3f617975a4d005d79121313b5f
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 13:52:06 2011 -0700

Simple +1 changes in hardcoded lengths when changing from safe_strcpy to 
strlcpy.

commit 265338c194ceab2520ed1df0f64b62e7169406dd
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 13:49:28 2011 -0700

BUGFIX when converting from safe_strcpy to strlcpy.

We must have a blob legth  0 in order to safely copy
the (possibly) 16 bytes + 1 byte 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-04 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  c357147 Fix off-by-one when used with safe_strcpy. (cherry picked 
from commit 18582016d96e3f41f8828f0539969678ad7d233e)
   via  0692059 BUGFIX when converting from safe_strcpy to strlcpy.
  from  1766905 Remove unused function parse_add_domuser().

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


- Log -
commit c357147e0c40cbe00b0bc0d5f90ac0f4e2ad3ca5
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 13:57:30 2011 -0700

Fix off-by-one when used with safe_strcpy.
(cherry picked from commit 18582016d96e3f41f8828f0539969678ad7d233e)

commit 0692059d162cc146bd8f2cc302b5cba64f049a9a
Author: Jeremy Allison j...@samba.org
Date:   Tue May 3 13:49:28 2011 -0700

BUGFIX when converting from safe_strcpy to strlcpy.

We must have a blob legth  0 in order to safely copy
the (possibly) 16 bytes + 1 byte zero character safely.
(cherry picked from commit 265338c194ceab2520ed1df0f64b62e7169406dd)

---

Summary of changes:
 source3/smbd/negprot.c  |6 +-
 source3/smbd/password.c |2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 0a56d36..a2e7e0b 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -234,6 +234,10 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct 
smbd_server_connection *sconn)
SAFE_FREE(host_princ_s);
}
 
+   if (blob.length == 0 || blob.data == NULL) {
+   return data_blob_null;
+   }
+
blob_out = data_blob_talloc(ctx, NULL, 16 + blob.length);
if (blob_out.data == NULL) {
data_blob_free(blob);
@@ -245,7 +249,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct 
smbd_server_connection *sconn)
safe_strcpy(unix_name, global_myname(), sizeof(unix_name)-1);
strlower_m(unix_name);
push_ascii_nstring(dos_name, unix_name);
-   safe_strcpy((char *)blob_out.data, dos_name, 16);
+   strlcpy((char *)blob_out.data, dos_name, 17);
 
 #ifdef DEVELOPER
/* Fix valgrind 'uninitialized bytes' issue. */
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 4b38de7..ddc7ad1 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -549,7 +549,7 @@ static char *validate_group(struct smbd_server_connection 
*sconn,
DEBUG(10,(validate_group: = gr_mem = 
  %s\n, gptr-gr_mem[i]));
 
-   safe_strcpy(member, gptr-gr_mem[i],
+   strlcpy(member, gptr-gr_mem[i],
list_len - (member-member_list));
member += member_len;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Jeremy Allison
The branch, master has been updated
   via  1c71485 Clean up some const and other compiler warnings.
  from  ff215f5 I added them, so I get to kill them :-). Finally remove all 
uses of safe_strcpy and safe_strcat. Change to strlcpy, strlcat.

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


- Log -
commit 1c714850d5068864b1f04a4211223dec11a30d67
Author: Jeremy Allison j...@samba.org
Date:   Wed May 4 14:57:37 2011 -0700

Clean up some const and other compiler warnings.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Thu May  5 00:59:40 CEST 2011 on sn-devel-104

---

Summary of changes:
 lib/nss_wrapper/nss_wrapper.c|2 ++
 lib/util/charset/util_str.c  |8 
 lib/util/charset/util_unistr_w.c |4 ++--
 lib/util/util_net.c  |2 +-
 nsswitch/libwbclient/wbc_util.c  |   16 
 source4/torture/basic/attr.c |2 +-
 source4/torture/raw/acls.c   |   14 +++---
 source4/torture/raw/open.c   |2 +-
 source4/torture/raw/qfileinfo.c  |2 +-
 source4/torture/raw/streams.c|8 ++--
 source4/torture/smb2/acls.c  |7 +--
 11 files changed, 42 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/nss_wrapper/nss_wrapper.c b/lib/nss_wrapper/nss_wrapper.c
index cfa5a68..8767fbf 100644
--- a/lib/nss_wrapper/nss_wrapper.c
+++ b/lib/nss_wrapper/nss_wrapper.c
@@ -36,7 +36,9 @@
 
 /* defining this gives us the posix getpwnam_r() calls on solaris
Thanks to heimdal for this */
+#ifndef _POSIX_PTHREAD_SEMANTICS
 #define _POSIX_PTHREAD_SEMANTICS
+#endif
 
 #define NSS_WRAPPER_NOT_REPLACE
 #include ../replace/replace.h
diff --git a/lib/util/charset/util_str.c b/lib/util/charset/util_str.c
index 71a3778..4f4ca93 100644
--- a/lib/util/charset/util_str.c
+++ b/lib/util/charset/util_str.c
@@ -329,7 +329,7 @@ _PUBLIC_ char *strchr_m(const char *src, char c)
 
for (s = src; *s  !(((unsigned char)s[0])  0x80); s++) {
if (*s == c)
-   return (char *)s;
+   return discard_const_p(char, s);
}
 
if (!*s)
@@ -397,7 +397,7 @@ _PUBLIC_ char *strrchr_m(const char *s, char c)
break;
}
/* No - we have a match ! */
-   return (char *)cp;
+   return discard_const_p(char , cp);
}
} while (cp-- != s);
if (!got_mb)
@@ -492,7 +492,7 @@ char *strstr_m(const char *src, const char *findstr)
 
/* for correctness */
if (!findstr[0]) {
-   return (char*)src;
+   return discard_const_p(char, src);
}
 
/* Samba does single character findstr calls a *lot*. */
@@ -509,7 +509,7 @@ char *strstr_m(const char *src, const char *findstr)
findstr_len = strlen(findstr);
 
if (strncmp(s, findstr, findstr_len) == 0) {
-   return (char *)s;
+   return discard_const_p(char, s);
}
}
}
diff --git a/lib/util/charset/util_unistr_w.c b/lib/util/charset/util_unistr_w.c
index a550e52..22f22ab 100644
--- a/lib/util/charset/util_unistr_w.c
+++ b/lib/util/charset/util_unistr_w.c
@@ -22,8 +22,8 @@
 #include includes.h
 
 /* Copy into a smb_ucs2_t from a possibly unaligned buffer. Return the copied 
smb_ucs2_t */
-#define COPY_UCS2_CHAR(dest,src) (((unsigned char *)(dest))[0] = ((unsigned 
char *)(src))[0],\
-   ((unsigned char *)(dest))[1] = ((unsigned char 
*)(src))[1], (dest))
+#define COPY_UCS2_CHAR(dest,src) (((unsigned char *)(dest))[0] = ((const 
unsigned char *)(src))[0],\
+   ((unsigned char *)(dest))[1] = ((const unsigned 
char *)(src))[1], (dest))
 
 
 /* return an ascii version of a ucs2 character */
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index a8a05da..7d678c9 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -591,7 +591,7 @@ char *print_sockaddr(char *dest,
size_t destlen,
const struct sockaddr_storage *psa)
 {
-   return print_sockaddr_len(dest, destlen, (struct sockaddr *)psa,
+   return print_sockaddr_len(dest, destlen, (const struct sockaddr *)psa,
sizeof(struct sockaddr_storage));
 }
 
diff --git a/nsswitch/libwbclient/wbc_util.c b/nsswitch/libwbclient/wbc_util.c
index d783ba3..af134ba 100644
--- a/nsswitch/libwbclient/wbc_util.c
+++ b/nsswitch/libwbclient/wbc_util.c
@@ -623,13 +623,13 @@ static void wbcDomainControllerInfoExDestructor(void *ptr)
 {
struct wbcDomainControllerInfoEx *i =
 

[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Matthieu Patou
The branch, master has been updated
   via  7f36f3e s4-samba-tool: allow specification of targetdir when 
joining as (RO)DC
  from  1c71485 Clean up some const and other compiler warnings.

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


- Log -
commit 7f36f3effa200709df021789786f6e7555aef33c
Author: Matthieu Patou m...@matws.net
Date:   Mon Mar 21 18:03:50 2011 +0300

s4-samba-tool: allow specification of targetdir when joining as (RO)DC

Autobuild-User: Matthieu Patou m...@samba.org
Autobuild-Date: Thu May  5 02:04:13 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/scripting/python/samba/netcmd/join.py |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/netcmd/join.py 
b/source4/scripting/python/samba/netcmd/join.py
index 507253a..70b7501 100644
--- a/source4/scripting/python/samba/netcmd/join.py
+++ b/source4/scripting/python/samba/netcmd/join.py
@@ -22,7 +22,7 @@ import samba.getopt as options
 
 from samba.net import Net, LIBNET_JOIN_AUTOMATIC
 from samba.netcmd import Command, CommandError, Option
-from samba.dcerpc.misc import SEC_CHAN_WKSTA, SEC_CHAN_BDC
+from samba.dcerpc.misc import SEC_CHAN_WKSTA
 from samba.join import join_RODC, join_DC
 
 class cmd_join(Command):
@@ -39,12 +39,13 @@ class cmd_join(Command):
 takes_options = [
 Option(--server, help=DC to join, type=str),
 Option(--site, help=site to join, type=str),
+Option(--targetdir, help=where to store provision, type=str),
 ]
 
 takes_args = [domain, role?]
 
 def run(self, domain, role=None, sambaopts=None, credopts=None,
-versionopts=None, server=None, site=None):
+versionopts=None, server=None, site=None, targetdir=None):
 lp = sambaopts.get_loadparm()
 creds = credopts.get_credentials(lp)
 net = Net(creds, lp, server=credopts.ipaddress)
@@ -61,11 +62,11 @@ class cmd_join(Command):
 secure_channel_type = SEC_CHAN_WKSTA
 elif role == DC:
 join_DC(server=server, creds=creds, lp=lp, domain=domain,
-site=site, netbios_name=netbios_name)
+site=site, netbios_name=netbios_name, targetdir=targetdir)
 return
 elif role == RODC:
 join_RODC(server=server, creds=creds, lp=lp, domain=domain,
-  site=site, netbios_name=netbios_name)
+  site=site, netbios_name=netbios_name, 
targetdir=targetdir)
 return
 else:
 raise CommandError(Invalid role %s (possible values: MEMBER, BDC, 
RODC) % role)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Günther Deschner
The branch, master has been updated
   via  8563d5c s3-rpc_server: run minimal_includes.pl.
   via  bd92826 s3-rpc_client: run minimal_includes.pl.
   via  c11d52c s3-rpcclient: run minimal_includes.pl.
   via  c9f3a2c s3-printing: run minimal_includes.pl.
   via  62314da s3-param: run minimal_includes.pl.
   via  ea89604 s3-libsmb: run minimal_includes.pl.
   via  a05a59e s3-libnet: run minimal_includes.pl.
   via  653b84d s3-libads: run minimal_includes.pl.
   via  63ebc91 s3-lib: run minimal_includes.pl.
   via  58db720 s3-auth: run minimal_includes.pl
  from  7f36f3e s4-samba-tool: allow specification of targetdir when 
joining as (RO)DC

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


- Log -
commit 8563d5c384f672276d8ea2ab20a1810ff485e37d
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:58:27 2011 +0200

s3-rpc_server: run minimal_includes.pl.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Thu May  5 03:04:38 CEST 2011 on sn-devel-104

commit bd92826aa837f56119153b93cfce7f843e567896
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:54:56 2011 +0200

s3-rpc_client: run minimal_includes.pl.

Guenther

commit c11d52c7f6b560fe66a2f197e30602d57370fd5c
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:51:12 2011 +0200

s3-rpcclient: run minimal_includes.pl.

Guenther

commit c9f3a2c83e208fcf05576eb2137c893fe4f3fe6d
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:48:26 2011 +0200

s3-printing: run minimal_includes.pl.

Guenther

commit 62314da8059ae888c0d1b299c486156664611e06
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:36:51 2011 +0200

s3-param: run minimal_includes.pl.

Guenther

commit ea8960448d0a40067382a8d14ae19351d20acbdd
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:31:42 2011 +0200

s3-libsmb: run minimal_includes.pl.

Guenther

commit a05a59e8e2a421f22978e6eedbb1a7501a603aff
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:25:31 2011 +0200

s3-libnet: run minimal_includes.pl.

Guenther

commit 653b84d2d6ed7387f93e5a126b5f2114b831044e
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:22:05 2011 +0200

s3-libads: run minimal_includes.pl.

Guenther

commit 63ebc918e4514f0006b94856d9b089255fca9718
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:10:23 2011 +0200

s3-lib: run minimal_includes.pl.

Guenther

commit 58db720e27d4b0c580fb4d3e036d823bc5d3a141
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:03:48 2011 +0200

s3-auth: run minimal_includes.pl

Guenther

---

Summary of changes:
 source3/auth/auth_sam.c   |1 -
 source3/auth/auth_unix.c  |1 -
 source3/auth/auth_util.c  |1 -
 source3/auth/server_info_sam.c|2 --
 source3/auth/token_util.c |1 -
 source3/lib/filename_util.c   |1 -
 source3/lib/util_builtin.c|1 -
 source3/libads/ldap_printer.c |2 --
 source3/libnet/libnet_dssync_passdb.c |1 -
 source3/libnet/libnet_samsync.c   |1 -
 source3/libsmb/cli_np_tstream.c   |1 -
 source3/libsmb/smbsock_connect.c  |1 -
 source3/param/loadparm.c  |1 -
 source3/printing/nt_printing.c|5 -
 source3/printing/nt_printing_migrate.c|1 -
 source3/printing/printspoolss.c   |1 -
 source3/printing/spoolssd.c   |2 --
 source3/rpc_client/cli_pipe.c |1 -
 source3/rpc_client/cli_winreg_int.c   |1 -
 source3/rpc_client/rpc_transport_sock.c   |1 -
 source3/rpc_server/epmapper/srv_epmapper.c|1 -
 source3/rpc_server/epmd.c |1 -
 source3/rpc_server/eventlog/srv_eventlog_nt.c |1 -
 source3/rpc_server/netlogon/srv_netlog_nt.c   |2 --
 source3/rpc_server/rpc_ep_setup.c |1 -
 source3/rpc_server/samr/srv_samr_nt.c |1 -
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c |1 -
 source3/rpcclient/cmd_spoolss.c   |1 -
 28 files changed, 0 insertions(+), 36 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 8d2300d..d09d60e 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -22,7 +22,6 @@
 
 #include includes.h
 #include auth.h
-#include ../libcli/auth/libcli_auth.h
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index 8f9eacf..086c39e 100644
--- 

[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Andrew Tridgell
The branch, master has been updated
   via  323c744 s4-auth: removed the password combinations code in auth_unix
  from  8563d5c s3-rpc_server: run minimal_includes.pl.

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


- Log -
commit 323c7445713d17989452b99bbb541248bb2388eb
Author: Andrew Tridgell tri...@samba.org
Date:   Thu May 5 13:59:08 2011 +1000

s4-auth: removed the password combinations code in auth_unix

this code never did anything due to a typo, and was untested. We
should not be inluding a password cracker in Samba anyway.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu May  5 07:00:14 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/auth/ntlm/auth_unix.c |   43 +++-
 1 files changed, 4 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/ntlm/auth_unix.c b/source4/auth/ntlm/auth_unix.c
index 743cb81..7fdb4b3 100644
--- a/source4/auth/ntlm/auth_unix.c
+++ b/source4/auth/ntlm/auth_unix.c
@@ -737,46 +737,11 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, 
struct loadparm_context *lp
return nt_status;
}
 
-   if ( user_info-flags | USER_INFO_CASE_INSENSITIVE_PASSWORD) {
-   return nt_status;
-   }
-
-   /* if the password was given to us with mixed case then we don't
-* need to proceed as we know it hasn't been case modified by the
-* client */
-   if (strhasupper(password)  strhaslower(password)) {
-   return nt_status;
-   }
-
-   /* make a copy of it */
-   pwcopy = talloc_strdup(ctx, password);
-   if (!pwcopy)
-   return NT_STATUS_NO_MEMORY;
-
-   /* try all lowercase if it's currently all uppercase */
-   if (strhasupper(pwcopy)) {
-   strlower(pwcopy);
-   nt_status = password_check(username, pwcopy, crypted, salt);
-   if NT_STATUS_IS_OK(nt_status) {
-   *ret_passwd = pws;
-   return nt_status;
-   }
-   }
-
-   /* give up? */
-   if (level  1) {
-   return NT_STATUS_WRONG_PASSWORD;
-   }
-
-   /* last chance - all combinations of up to level chars upper! */
-   strlower(pwcopy);
+   /* we no longer try different case combinations here. The use
+* of this code is now web auth, where trying different case
+* combinations makes no sense
+*/
 
-#if 0
-if (NT_STATUS_IS_OK(nt_status = string_combinations(pwcopy, 
password_check, level))) {
-   *ret_passwd = pws;
-   return nt_status;
-   }
-#endif   
return NT_STATUS_WRONG_PASSWORD;
 }
 


-- 
Samba Shared Repository