[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Andrew Bartlett
The branch, master has been updated
   via  c7b9dbe s3-libsmb remove ldap_err2string() as common nterrs[] has 
the constants
   via  6552561 s3-build Don't allow undefined symbols in pam_smbpass.so
   via  c004a93 libcli/util Remove ntstatus_check_dos_mapping
  from  4ac4ad2 s3-utils: fix another -Wunused-but-set-variable build 
warning.

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


- Log -
commit c7b9dbea109f8cdc6d74b17f724653bf3534dcc2
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 31 14:33:23 2011 +1000

s3-libsmb remove ldap_err2string() as common nterrs[] has the constants

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Tue May 31 08:58:00 CEST 2011 on sn-devel-104

commit 6552561b87ff5537d17ca82a85f7eb7943231241
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 31 13:26:57 2011 +1000

s3-build Don't allow undefined symbols in pam_smbpass.so

commit c004a932c45a4b343814eb2e3f2d611a2dfe7311
Author: Andrew Bartlett abart...@samba.org
Date:   Sat May 14 21:53:05 2011 +0200

libcli/util Remove ntstatus_check_dos_mapping

This has been set to true since the global loadparm was removed in
2008, and removes an #ifdef SAMBA_BUILD == 4

Andrew Bartlett

---

Summary of changes:
 libcli/util/ntstatus.h|9 -
 source3/libsmb/nterr.c|6 --
 source3/pam_smbpass/wscript_build |1 +
 source4/libcli/util/errormap.c|   35 ---
 source4/param/loadparm.c  |2 --
 5 files changed, 1 insertions(+), 52 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/util/ntstatus.h b/libcli/util/ntstatus.h
index 2217b4c..13ce733 100644
--- a/libcli/util/ntstatus.h
+++ b/libcli/util/ntstatus.h
@@ -648,9 +648,6 @@ const char *get_nt_error_c_code(void *mem_ctx, NTSTATUS 
nt_code);
  */
 NTSTATUS nt_status_string_to_code(const char *nt_status_str);
 
-/** Used by ntstatus_dos_equal: */
-extern bool ntstatus_check_dos_mapping;
-
 /* we need these here for openchange */
 #ifndef likely
 #define likely(x) (x)
@@ -661,13 +658,7 @@ extern bool ntstatus_check_dos_mapping;
 
 #define NT_STATUS_IS_OK(x) (likely(NT_STATUS_V(x) == 0))
 #define NT_STATUS_IS_ERR(x) (unlikely((NT_STATUS_V(x)  0xc000) == 
0xc000))
-/* checking for DOS error mapping here is ugly, but unfortunately the
-   alternative is a very intrusive rewrite of the torture code */
-#if _SAMBA_BUILD_ == 4
-#define NT_STATUS_EQUAL(x,y) 
(NT_STATUS_IS_DOS(x)||NT_STATUS_IS_DOS(y)?ntstatus_dos_equal(x,y):NT_STATUS_V(x)
 == NT_STATUS_V(y))
-#else
 #define NT_STATUS_EQUAL(x,y) (NT_STATUS_V(x) == NT_STATUS_V(y))
-#endif
 
 #define NT_STATUS_HAVE_NO_MEMORY(x) do { \
if (unlikely(!(x))) {   \
diff --git a/source3/libsmb/nterr.c b/source3/libsmb/nterr.c
index 1302326..7d0b3d0 100644
--- a/source3/libsmb/nterr.c
+++ b/source3/libsmb/nterr.c
@@ -36,12 +36,6 @@ const char *nt_errstr(NTSTATUS nt_code)
int idx = 0;
char *result;
 
-#ifdef HAVE_LDAP
-   if (NT_STATUS_IS_LDAP(nt_code)) {
-   return ldap_err2string(NT_STATUS_LDAP_CODE(nt_code));
-   }
-#endif
-
if (NT_STATUS_IS_DOS(nt_code)) {
return smb_dos_err_name(NT_STATUS_DOS_CLASS(nt_code),
NT_STATUS_DOS_CODE(nt_code));
diff --git a/source3/pam_smbpass/wscript_build 
b/source3/pam_smbpass/wscript_build
index 0d200c6..8c15d71 100644
--- a/source3/pam_smbpass/wscript_build
+++ b/source3/pam_smbpass/wscript_build
@@ -10,4 +10,5 @@ if bld.CONFIG_SET('WITH_PAM_MODULES'):
 LIBNTLMSSP LIBTSOCKET''',
 cflags='-DLOCALEDIR=\%s/locale\' % bld.env.DATADIR,
 realname='pam_smbpass.so',
+   allow_undefined_symbols=False
 )
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 6392a62..23432ca 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -570,41 +570,6 @@ static const struct {
{ WERR_OK, NT_STATUS_OK }
 };
 
-bool ntstatus_check_dos_mapping = true;
-
-/*
-  check if a DOS encoded NTSTATUS code maps to the given NTSTATUS code
-*/
-bool ntstatus_dos_equal(NTSTATUS status1, NTSTATUS status2)
-{
-   /* when we negotiate nt status support, we don't want to consider
-  the mapping of dos codes, as we want to catch the cases where
-  a forced dos code is needed
-   */
-   if (ntstatus_check_dos_mapping) {
-   return NT_STATUS_V(status1) == NT_STATUS_V(status2);
-   }
-
-   /* otherwise check if the mapping comes out right. Note that it is 
important
-  that we do the mapping only from ntstatus - dos and not from dos - 
ntstatus,
-   

[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Michael Adam
The branch, master has been updated
   via  54c788f s3:doc: document idmap gid as deprecated.
   via  7c1021b s3:doc: document idmap uid as deprecated.
   via  871daf1 s3:doc: remove the documentation of idmap alloc backend, 
which has been removed
   via  13c4c30 s3:doc: document idmap backend as deprecated.
   via  939378d s3:doc: update documentation of the idmap config FOO : 
BAR familiy of parameters
   via  36feb8a s3:lib/eventlog/proto.h: add _LIB_EVENTLOG_PROTO_H_ guard
   via  00530e3 s3:lib/eventlog/proto.h: add GPL/Copyright header
  from  c7b9dbe s3-libsmb remove ldap_err2string() as common nterrs[] has 
the constants

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


- Log -
commit 54c788f2dff1280636f3ce6f21e547c852aa862f
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 10:29:37 2011 +0200

s3:doc: document idmap gid as deprecated.

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Tue May 31 11:39:38 CEST 2011 on sn-devel-104

commit 7c1021bc2b90777c2171dff2923ee16a0957c2f5
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 10:29:08 2011 +0200

s3:doc: document idmap uid as deprecated.

commit 871daf1aa4b3c73e63f0ff7e47a444bfc000b7aa
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 10:08:44 2011 +0200

s3:doc: remove the documentation of idmap alloc backend, which has been 
removed

commit 13c4c30a02269b91379a50acbc45a883588d37bf
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 10:07:59 2011 +0200

s3:doc: document idmap backend as deprecated.

commit 939378d42abaed230bf7590c37ea275c57f4fd93
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 10:03:18 2011 +0200

s3:doc: update documentation of the idmap config FOO : BAR familiy of 
parameters

commit 36feb8a240a7f061e25223364c1f7ca8476a029f
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 07:32:15 2011 +0200

s3:lib/eventlog/proto.h: add _LIB_EVENTLOG_PROTO_H_ guard

commit 00530e3d0166641a4f9716067e3c5d1146b0db17
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 07:31:14 2011 +0200

s3:lib/eventlog/proto.h: add GPL/Copyright header

---

Summary of changes:
 docs-xml/smbdotconf/winbind/idmapallocconfig.xml |   14 ---
 docs-xml/smbdotconf/winbind/idmapbackend.xml |   35 +---
 docs-xml/smbdotconf/winbind/idmapconfig.xml  |  103 +
 docs-xml/smbdotconf/winbind/idmapgid.xml |   13 +--
 docs-xml/smbdotconf/winbind/idmapuid.xml |   12 +--
 source3/lib/eventlog/proto.h |   27 ++
 6 files changed, 122 insertions(+), 82 deletions(-)
 delete mode 100644 docs-xml/smbdotconf/winbind/idmapallocconfig.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/winbind/idmapallocconfig.xml 
b/docs-xml/smbdotconf/winbind/idmapallocconfig.xml
deleted file mode 100644
index 0139041..000
--- a/docs-xml/smbdotconf/winbind/idmapallocconfig.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-samba:parameter name=idmap alloc config
- context=G
-type=string
- advanced=1 developer=1 hide=1
- xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
-description
-   para
-   The idmap alloc config prefix provides a means of managing settings
-   for the backend defined by the smbconfoption name=idmap alloc 
backend/ 
-   parameter.  Refer to the man page for each idmap plugin regarding
-   specific configuration details.
-   /para
-/description
-/samba:parameter
diff --git a/docs-xml/smbdotconf/winbind/idmapbackend.xml 
b/docs-xml/smbdotconf/winbind/idmapbackend.xml
index 824476f..bd96dfe 100644
--- a/docs-xml/smbdotconf/winbind/idmapbackend.xml
+++ b/docs-xml/smbdotconf/winbind/idmapbackend.xml
@@ -11,39 +11,8 @@
 
para
This option specifies the default backend that is used when no special
-   configuration set by smbconfoption name=idmap config/ matches the
-   specific request.
-   /para
-
-   para
-   This default backend also specifies the place where winbind-generated
-   idmap entries will be stored. So it is highly recommended that you
-   specify a writable backend like citerefentry
-   refentrytitleidmap_tdb/refentrytitle manvolnum8/manvolnum
-   /citerefentry or citerefentry
-   refentrytitleidmap_ldap/refentrytitle manvolnum8/manvolnum
-   /citerefentry as the idmap backend. The citerefentry
-   refentrytitleidmap_rid/refentrytitle manvolnum8/manvolnum
-   /citerefentry and citerefentry
-   refentrytitleidmap_ad/refentrytitle manvolnum8/manvolnum
-   /citerefentry backends are not writable and thus will generate
-   unexpected results if set as idmap backend.
-   /para
-
-   para
-   To use the rid and ad backends, please specify them via the
-

[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Volker Lendecke
The branch, master has been updated
   via  0fcafbf s3: Support shadow copy display over SMB2
  from  54c788f s3:doc: document idmap gid as deprecated.

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


- Log -
commit 0fcafbf69b345b703dc759518afc8620a7d6f2e8
Author: Volker Lendecke v...@samba.org
Date:   Mon May 30 17:14:56 2011 +0200

s3: Support shadow copy display over SMB2

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Tue May 31 12:53:10 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/smbd/smb2_ioctl.c |  121 +
 1 files changed, 121 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c
index 40276c5..4848742 100644
--- a/source3/smbd/smb2_ioctl.c
+++ b/source3/smbd/smb2_ioctl.c
@@ -24,6 +24,7 @@
 #include ../libcli/smb/smb_common.h
 #include ../lib/util/tevent_ntstatus.h
 #include rpc_server/srv_pipe_hnd.h
+#include include/ntioctl.h
 
 static struct tevent_req *smbd_smb2_ioctl_send(TALLOC_CTX *mem_ctx,
   struct tevent_context *ev,
@@ -378,6 +379,126 @@ static struct tevent_req *smbd_smb2_ioctl_send(TALLOC_CTX 
*mem_ctx,
req);
return req;
 
+   case 0x00144064:/* FSCTL_SRV_ENUMERATE_SNAPSHOTS */
+   {
+   /*
+* This is called to retrieve the number of Shadow Copies 
(a.k.a. snapshots)
+* and return their volume names.  If max_data_count is 16, 
then it is just
+* asking for the number of volumes and length of the combined 
names.
+*
+* pdata is the data allocated by our caller, but that uses
+* total_data_count (which is 0 in our case) rather than 
max_data_count.
+* Allocate the correct amount and return the pointer to let
+* it be deallocated when we return.
+*/
+   struct shadow_copy_data *shadow_data = NULL;
+   bool labels = False;
+   uint32_t labels_data_count = 0;
+   uint32_t data_count;
+   uint32_t i;
+   char *pdata;
+   NTSTATUS status;
+
+   if (in_max_output  16) {
+   DEBUG(0,(FSCTL_GET_SHADOW_COPY_DATA: 
+in_max_output(%u)  16 is invalid!\n,
+in_max_output));
+   tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+   return tevent_req_post(req, ev);
+   }
+
+   if (in_max_output  16) {
+   labels = True;
+   }
+
+   shadow_data = TALLOC_ZERO_P(talloc_tos(),
+   struct shadow_copy_data);
+   if (tevent_req_nomem(shadow_data, req)) {
+   DEBUG(0,(TALLOC_ZERO() failed!\n));
+   return tevent_req_post(req, ev);
+   }
+
+   /*
+* Call the VFS routine to actually do the work.
+*/
+   if (SMB_VFS_GET_SHADOW_COPY_DATA(fsp, shadow_data, labels)
+   != 0) {
+   if (errno == ENOSYS) {
+   DEBUG(5, (FSCTL_GET_SHADOW_COPY_DATA: 
+ connectpath %s, not supported.\n,
+ smbreq-conn-connectpath));
+   status = NT_STATUS_NOT_SUPPORTED;
+   } else {
+   DEBUG(0,(FSCTL_GET_SHADOW_COPY_DATA: 
+connectpath %s, failed.\n,
+smbreq-conn-connectpath));
+   status = map_nt_error_from_unix(errno);
+   }
+   TALLOC_FREE(shadow_data);
+   tevent_req_nterror(req, status);
+   return tevent_req_post(req, ev);
+   }
+
+   labels_data_count =
+   (shadow_data-num_volumes*2*sizeof(SHADOW_COPY_LABEL))
+   + 2;
+
+   if (labels) {
+   data_count = 12+labels_data_count+4;
+   } else {
+   data_count = 16;
+   }
+
+   if (labels  (in_max_output  data_count)) {
+   DEBUG(0, (FSCTL_GET_SHADOW_COPY_DATA: 
+ in_max_output(%u) too small (%u) bytes 
+ needed!\n, in_max_output, data_count));
+   TALLOC_FREE(shadow_data);
+   

[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Michael Adam
The branch, master has been updated
   via  9549cf1 s3:librpc: remove unused file librpc/ndr/util.h
   via  52bc63a s3:winbindd_nrd: include ../librpc/ndr/libndr.h instead of 
librpc/ndr/util.h
   via  72f2bd6 s3:libads/ndr: include ../librpc/ndr/libndr.h instead of 
librpc/ndr/util.h
  from  0fcafbf s3: Support shadow copy display over SMB2

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


- Log -
commit 9549cf125a2e54a6bcaf4251b1f363775f8e7929
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 12:06:00 2011 +0200

s3:librpc: remove unused file librpc/ndr/util.h

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Tue May 31 15:19:46 CEST 2011 on sn-devel-104

commit 52bc63aa858318ae0f0227e2ff685a679906c72d
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 12:03:07 2011 +0200

s3:winbindd_nrd: include ../librpc/ndr/libndr.h instead of librpc/ndr/util.h

commit 72f2bd6a86265de49e66d97d5ac235bc5d089669
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 12:03:07 2011 +0200

s3:libads/ndr: include ../librpc/ndr/libndr.h instead of librpc/ndr/util.h

---

Summary of changes:
 source3/libads/ndr.c|2 +-
 source3/librpc/ndr/util.h   |4 
 source3/winbindd/winbindd_ndr.c |2 +-
 3 files changed, 2 insertions(+), 6 deletions(-)
 delete mode 100644 source3/librpc/ndr/util.h


Changeset truncated at 500 lines:

diff --git a/source3/libads/ndr.c b/source3/libads/ndr.c
index c6b1121..c667aa3 100644
--- a/source3/libads/ndr.c
+++ b/source3/libads/ndr.c
@@ -22,7 +22,7 @@
 #include includes.h
 #include ads.h
 #include ../librpc/gen_ndr/ndr_netlogon.h
-#include librpc/ndr/util.h
+#include ../librpc/ndr/libndr.h
 
 static void ndr_print_ads_auth_flags(struct ndr_print *ndr, const char *name, 
uint32_t r)
 {
diff --git a/source3/librpc/ndr/util.h b/source3/librpc/ndr/util.h
deleted file mode 100644
index 3bf9c0e..000
--- a/source3/librpc/ndr/util.h
+++ /dev/null
@@ -1,4 +0,0 @@
-
-/* The following definitions come from librpc/ndr/util.c  */
-
-_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char 
*name, const struct sockaddr_storage *ss);
diff --git a/source3/winbindd/winbindd_ndr.c b/source3/winbindd/winbindd_ndr.c
index 2f26d8d..b1fd6d7 100644
--- a/source3/winbindd/winbindd_ndr.c
+++ b/source3/winbindd/winbindd_ndr.c
@@ -21,7 +21,7 @@
 #include winbindd.h
 #include ../librpc/gen_ndr/ndr_netlogon.h
 #include ../librpc/gen_ndr/ndr_security.h
-#include librpc/ndr/util.h
+#include ../librpc/ndr/libndr.h
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Björn Jacke
The branch, master has been updated
   via  65f0800 replace: remove waring if IOV_MAX is not defined
  from  9549cf1 s3:librpc: remove unused file librpc/ndr/util.h

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


- Log -
commit 65f0800a34270ff0c779c9f3feb63b02d3ec800f
Author: Björn Jacke b...@sernet.de
Date:   Tue May 31 09:47:17 2011 +0200

replace: remove waring if IOV_MAX is not defined

as discussed on samba-techincal we currelty don't rely on it and we don't 
want
to flood this warning message during compile.

Autobuild-User: Björn Jacke b...@sernet.de
Autobuild-Date: Tue May 31 18:36:53 CEST 2011 on sn-devel-104

---

Summary of changes:
 lib/replace/system/network.h |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
index 2ec9ebd..a4e6a7e 100644
--- a/lib/replace/system/network.h
+++ b/lib/replace/system/network.h
@@ -331,8 +331,6 @@ typedef unsigned short int sa_family_t;
  * which might return 512 or bigger
  */
 #   define IOV_MAX 512
-#  else
-#   warning IOV_MAX and UIO_MAXIOV undefined
 #  endif
 # endif
 #endif


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Michael Adam
The branch, master has been updated
   via  cfef10a s3:doc: clean up the example section of the idmap_tdb 
manpage
   via  c3fecc6 winbindd.8: Use new idmap syntax for smbconfoptions
   via  c0fc7aa s3:passdb: add GPL/copyright header to machine_sid.h
   via  fdd225c s3:nmbd: add _NMBD_NMBD_H_ guard to nmbd.h
   via  75cfafd s3:nmbd: add GPL/Copyright header to nmbd.h
   via  e403315 s3:rpc_server: add _RPC_SERVER_SRV_ACCESS_CHECK_H_ guard to 
srv_access_check.h
   via  942ae87 s3:rpc_server: add GPL/Copyright header to 
rpc_server/srv_access_check.h
   via  c2887f0 s3: add _LIB_IDMAP_CACHE_H_ guard to lib/idmap_cache.h
   via  2b8803d s3: add GPL/Copyright header to lib/idmap_cache.h
  from  65f0800 replace: remove waring if IOV_MAX is not defined

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


- Log -
commit cfef10a0a2a16221eac27b6b7d3b3d7d952a418e
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 18:09:14 2011 +0200

s3:doc: clean up the example section of the idmap_tdb manpage

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Tue May 31 19:47:45 CEST 2011 on sn-devel-104

commit c3fecc6bdc7a06516a53189115a986f2cd0f42cc
Author: Luk Claes l...@debian.org
Date:   Tue May 31 17:21:09 2011 +0200

winbindd.8: Use new idmap syntax for smbconfoptions

Signed-off-by: Luk Claes l...@debian.org
Signed-off-by: Michael Adam ob...@samba.org

commit c0fc7aa129c25664c76b3fdb4b9150c63fe3dd70
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 14:32:40 2011 +0200

s3:passdb: add GPL/copyright header to machine_sid.h

commit fdd225c3e41ed5a81ef02d39ac037818bde49c03
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 13:30:34 2011 +0200

s3:nmbd: add _NMBD_NMBD_H_ guard to nmbd.h

commit 75cfafd69864fccacd1e6c3ca8d27b42a48dbe1c
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 13:29:34 2011 +0200

s3:nmbd: add GPL/Copyright header to nmbd.h

commit e40331552137f513c6c2404d96adcf421212ec86
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 13:25:34 2011 +0200

s3:rpc_server: add _RPC_SERVER_SRV_ACCESS_CHECK_H_ guard to 
srv_access_check.h

commit 942ae874b85570f44b3257c8d229792ede7f8fd9
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 13:24:24 2011 +0200

s3:rpc_server: add GPL/Copyright header to rpc_server/srv_access_check.h

commit c2887f060954bd0e77bc6f3ac8fedec38e26c168
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 13:19:52 2011 +0200

s3: add _LIB_IDMAP_CACHE_H_ guard to lib/idmap_cache.h

commit 2b8803d458465508d0f4299248d858b9c393323e
Author: Michael Adam ob...@samba.org
Date:   Tue May 31 13:18:51 2011 +0200

s3: add GPL/Copyright header to lib/idmap_cache.h

---

Summary of changes:
 docs-xml/manpages-3/idmap_tdb.8.xml   |   23 +-
 docs-xml/manpages-3/winbindd.8.xml|   13 ---
 source3/lib/idmap_cache.h |   25 
 source3/nmbd/nmbd.h   |   25 
 source3/passdb/machine_sid.h  |   21 
 source3/rpc_server/srv_access_check.h |   34 +
 6 files changed, 111 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/idmap_tdb.8.xml 
b/docs-xml/manpages-3/idmap_tdb.8.xml
index cd024e8..c67d6cb 100644
--- a/docs-xml/manpages-3/idmap_tdb.8.xml
+++ b/docs-xml/manpages-3/idmap_tdb.8.xml
@@ -50,8 +50,7 @@
 
para
This example shows how tdb is used as a the default idmap backend.
-   It configures the idmap range through the global options for all
-   domains encountered. This same range is used for uid/gid allocation.
+   This configured range is used for uid and gid allocation.
/para
 
programlisting
@@ -60,26 +59,6 @@
idmap config * : backend = tdb
idmap config * : range = 100-200
/programlisting
-
-   para
-   This (rather theoretical) example shows how tdb can be used as the
-   allocating backend while ldap is the default backend used to store
-   the mappings.
-   It adds an explicit configuration for some domain DOM1, that
-   uses the tdb idmap backend. Note that the same range as the
-   default uid/gid range is used, since the allocator has to serve
-   both the default backend and the explicitly configured domain DOM1.
-   /para
-
-   programlisting
-   [global]
-   idmap config * : backend = ldap
-   idmap config * : range = 100-200
-   # use a different uid/gid allocator:
-
-   idmap config DOM1 : backend = tdb
-   idmap config DOM1 : range = 100-200
-   /programlisting
 /refsect1
 
 refsect1
diff --git a/docs-xml/manpages-3/winbindd.8.xml 

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

2011-05-31 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  91447e8 s3: Use the correct guest_login field in auth_server
   via  cce5009 s3: Extract the guest_login field in sesssetup (cherry 
picked from commit 01386ff3132ff5c786e83fc24328a80661de6bb7)
   via  1afd581 s3: Fix wct check in cli_sesssetup_blob_done (cherry picked 
from commit 4ec00fd621e944ff979e9f0a20773202d8c66472)
  from  a701f8f WHATSNEW: Update changes since rc1.

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


- Log -
commit 91447e8b49e27b9e2d76cf8f99efdc1faca49fc4
Author: Volker Lendecke v...@samba.org
Date:   Sun May 29 10:58:46 2011 +0200

s3: Use the correct guest_login field in auth_server

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sun May 29 13:57:21 CEST 2011 on sn-devel-104
(cherry picked from commit 0969c3398e73e66c9e004740127da7c29e951050)

The last 3 patches address bug #8185 (security=server does not obey guest 
login
field).

commit cce50095eaf4e0c040a4b1262b46d16890f6865a
Author: Volker Lendecke v...@samba.org
Date:   Sun May 29 10:58:05 2011 +0200

s3: Extract the guest_login field in sesssetup
(cherry picked from commit 01386ff3132ff5c786e83fc24328a80661de6bb7)

commit 1afd58160f264079b9c25a1603590c72f68993fc
Author: Volker Lendecke v...@samba.org
Date:   Sun May 29 10:56:39 2011 +0200

s3: Fix wct check in cli_sesssetup_blob_done
(cherry picked from commit 4ec00fd621e944ff979e9f0a20773202d8c66472)

---

Summary of changes:
 source3/auth/auth_server.c  |2 +-
 source3/include/client.h|1 +
 source3/libsmb/cliconnect.c |   23 ++-
 3 files changed, 20 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 94530ab..1dfa646 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -427,7 +427,7 @@ use this machine as the password server.\n));
}
 
/* if logged in as guest then reject */
-   if ((SVAL(cli-inbuf,smb_vwv2)  1) != 0) {
+   if (cli-is_guestlogin) {
DEBUG(1,(password server %s gave us guest only\n, 
cli-desthost));
nt_status = NT_STATUS_LOGON_FAILURE;
}
diff --git a/source3/include/client.h b/source3/include/client.h
index b51da90..7d66bf9 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -109,6 +109,7 @@ struct cli_state {
int initialised;
int win95;
bool is_samba;
+   bool is_guestlogin;
uint32 capabilities;
/* What the server offered. */
uint32_t server_posix_capabilities;
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 11062ef..b812581 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -259,8 +259,10 @@ static void cli_session_setup_lanman2_done(struct 
tevent_req *subreq)
uint8_t *p;
NTSTATUS status;
ssize_t ret;
+   uint8_t wct;
+   uint16_t *vwv;
 
-   status = cli_smb_recv(subreq, state, in, 0, NULL, NULL,
+   status = cli_smb_recv(subreq, state, in, 3, wct, vwv,
  num_bytes, bytes);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
@@ -272,6 +274,7 @@ static void cli_session_setup_lanman2_done(struct 
tevent_req *subreq)
p = bytes;
 
cli-vuid = SVAL(inbuf, smb_uid);
+   cli-is_guestlogin = ((SVAL(vwv+2, 0)  1) != 0);
 
status = smb_bytes_talloc_string(cli,
inbuf,
@@ -487,8 +490,10 @@ static void cli_session_setup_guest_done(struct tevent_req 
*subreq)
uint8_t *p;
NTSTATUS status;
ssize_t ret;
+   uint8_t wct;
+   uint16_t *vwv;
 
-   status = cli_smb_recv(subreq, state, in, 0, NULL, NULL,
+   status = cli_smb_recv(subreq, state, in, 3, wct, vwv,
  num_bytes, bytes);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
@@ -500,6 +505,7 @@ static void cli_session_setup_guest_done(struct tevent_req 
*subreq)
p = bytes;
 
cli-vuid = SVAL(inbuf, smb_uid);
+   cli-is_guestlogin = ((SVAL(vwv+2, 0)  1) != 0);
 
status = smb_bytes_talloc_string(cli,
inbuf,
@@ -695,8 +701,10 @@ static void cli_session_setup_plain_done(struct tevent_req 
*subreq)
uint8_t *p;
NTSTATUS status;
ssize_t ret;
+   uint8_t wct;
+   uint16_t *vwv;
 
-   status = cli_smb_recv(subreq, state, in, 0, NULL, NULL,
+   status = cli_smb_recv(subreq, state, in, 3, wct, vwv,
  num_bytes, bytes);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
@@ -707,6 +715,7 @@ static void cli_session_setup_plain_done(struct 

[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Volker Lendecke
The branch, master has been updated
   via  5f6f719 s3: Mark sockets in error state writable
  from  cfef10a s3:doc: clean up the example section of the idmap_tdb 
manpage

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


- Log -
commit 5f6f71956460d6840c1433b59e20555268b622ac
Author: Volker Lendecke v...@samba.org
Date:   Tue May 31 13:24:22 2011 +0200

s3: Mark sockets in error state writable

Without this patch, when a socket only has a write event pending, we will 
never
detect an error condition. I've seen winbind doing

12:19:13.659964 gettimeofday({1306837153, 659984}, NULL) = 0 0.16
12:19:13.660109 poll([{fd=35, events=POLLOUT}, {fd=32, 
events=POLLIN|POLLHUP}], 2, 9996) = 1 ([{fd=35, revents=POLLERR|POLLHUP}]) 
0.15
12:19:13.660253 gettimeofday({1306837153, 660269}, NULL) = 0 0.13
12:19:13.660298 poll([{fd=35, events=POLLOUT}, {fd=32, 
events=POLLIN|POLLHUP}], 2, 9996) = 1 ([{fd=35, revents=POLLERR|POLLHUP}]) 
0.15

for a while when trying to connect to a DC when the socket had died already.

Volker

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Tue May 31 20:59:10 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/lib/events.c |   23 +++
 1 files changed, 23 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/events.c b/source3/lib/events.c
index 9ff1488..499d92e 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -260,6 +260,29 @@ bool run_events_poll(struct tevent_context *ev, int 
pollrtn,
 
if (pfd-revents  (POLLIN|POLLHUP|POLLERR)) {
flags |= EVENT_FD_READ;
+
+   if ((fde-flags  EVENT_FD_READ) == 0) {
+   /*
+* This one is a bit subtle. If a socket is
+* not being asked for readability and dies
+* with POLLHUP|POLLERR, then the write
+* handler must be activated to detect the
+* dead socket with a failed write(2)
+* call. The error I've seen is winbind
+* spinning in poll trying to send something
+* to a DC on a dead socket. poll gave
+* POLLHUP|POLLERR, but because winbind at
+* this moment only had asked for socket
+* writability, it spun.
+*
+* We can't activate EVENT_FD_WRITE though
+* whenever we have an error condition via
+* POLLHUP|POLLERR, because at least smbd
+* monitors EVENT_FD_WRITE in its callback,
+* doing nothing.
+*/
+   flags |= EVENT_FD_WRITE;
+   }
}
if (pfd-revents  POLLOUT) {
flags |= EVENT_FD_WRITE;


-- 
Samba Shared Repository


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

2011-05-31 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  ac4aca9 WHATSNEW: Start to add changes since 3.5.8.
  from  e75afeb WHATSNEW: Start release notes for 3.5.9.

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


- Log -
commit ac4aca977ecb5fd1a644aa29c4b70503e906f83a
Author: Karolin Seeger ksee...@samba.org
Date:   Tue May 31 21:27:29 2011 +0200

WHATSNEW: Start to add changes since 3.5.8.

To be completed...

Karolin

---

Summary of changes:
 WHATSNEW.txt |   68 -
 1 files changed, 66 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index a59df9e..d18ef54 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,6 +1,6 @@
=
Release Notes for Samba 3.5.9
-  , 2011
+  June 14, 2011
=
 
 
@@ -13,7 +13,71 @@ o
 Changes since 3.5.8:
 
 
-o   
+o   Jeremy Allison j...@samba.org
+* BUG 7080: Quota only shown when logged as root.
+* BUG 7987: ACL can get lost when files are being renamed.
+* BUG 7996: sgid bit lost on folder rename.
+* BUG 8040: Fix 'smbclient' segfaults when a Cyrillic netbios name or
+  workgroup is configured.
+* BUG 8072: Fix panic in create_file_acl_common.
+* BUG 8088: Fix segfault in rpccli_samr_chng_pswd_auth_crap if any input
+  blobs are null.
+
+
+o   Christian Ambach a...@samba.org
+* BUG 8008: Fix a segfault in the krb5 locator plugin.
+* BUG 8012: Use getgrset() instead of initgroups() + getgroups() when
+  getgrouplist() is not defined.
+* BUG 8031: Convert gpfs:sharemodes and gpfs:leases parameters from a
+  global setting to a per share setting.
+
+
+o   Björn Baumbach b...@sernet.de
+* BUG 8074: Fix debug message.
+
+
+o   Dmitry Butskoy dmi...@butskoy.name
+* BUG 6966: Respect allow trusted domains = no in Winbind.
+
+
+o   Marc A. Dahlhaus m...@wol.de
+* BUG 8047: Fix mdns registration if interfaces= is used.
+
+
+o   Günther Deschner g...@samba.org
+* BUG 8085: Fix incorrect timeout handling in ncacn_ip_tcp client code.
+
+
+o   Björn Jacke b...@sernet.de
+* BUG 8033: Add explicit configure option whether to enable dmapi
+  support or not.
+
+
+o   Volker Lendecke v...@samba.org
+* BUG 8009: Fix getting username in 'net rap session'.
+* BUG 8011: Fix memory corruption in shadow_copy2.
+* BUG 8016: Fix gpfs_get_xattr.
+* BUG 8042: File creation on OS/X.
+* BUG 8054: Winbind cache stores/retrieves wrong sizes for 16-bit ints.
+* BUG 8066: Fix wrong output in 'smbget'.
+
+
+o   Nikolay Martynov mar.ko...@gmail.com
+* BUG 8010: Fix inode generation so nautilus can count total dir size
+  correctly.
+
+
+o   Stefan Metzmacher me...@samba.org
+* BUG 8034: SEC_STD_DELETE is always granted to the owner of a file.
+
+
+o   Larry Reid lcr...@jadesystems.ca
+* BUG 8055: Can't see Parts of DFS CIFS share.
+
+
+o   Martin Vogt martin.v...@itwm.fraunhofer.de
+* BUG 6762: Fix ctdb on gpfs error with MS Office.
+
 
 
 ##


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Volker Lendecke
The branch, master has been updated
   via  b9a727c Tiny simplification to dom_sid_string_buf
   via  d77854f struct make struct shadow_copy_data its own talloc context
   via  0ec9a90 s3: Remove SHADOW_COPY_DATA typedef
  from  5f6f719 s3: Mark sockets in error state writable

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


- Log -
commit b9a727c5f17c96138698a06e8c894387531e82b2
Author: Volker Lendecke v...@samba.org
Date:   Tue May 31 22:07:11 2011 +0200

Tiny simplification to dom_sid_string_buf

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Tue May 31 23:16:31 CEST 2011 on sn-devel-104

commit d77854fbb22bc9237cea14aae1179bbfe3bd0998
Author: Volker Lendecke v...@samba.org
Date:   Mon May 30 12:11:53 2011 +0200

struct make struct shadow_copy_data its own talloc context

commit 0ec9a90c29b86435f32c1d47d89df85fa51742f2
Author: Volker Lendecke v...@samba.org
Date:   Mon May 30 12:06:31 2011 +0200

s3: Remove SHADOW_COPY_DATA typedef

---

Summary of changes:
 libcli/security/dom_sid.c  |3 +--
 source3/include/ntioctl.h  |5 ++---
 source3/modules/vfs_default.c  |5 -
 source3/modules/vfs_full_audit.c   |3 ++-
 source3/modules/vfs_shadow_copy.c  |7 +--
 source3/modules/vfs_shadow_copy2.c |6 +++---
 source3/modules/vfs_time_audit.c   |2 +-
 source3/smbd/nttrans.c |   24 +++-
 source3/smbd/vfs.c |2 +-
 9 files changed, 26 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c
index 2f80a36..16b7af9 100644
--- a/libcli/security/dom_sid.c
+++ b/libcli/security/dom_sid.c
@@ -367,8 +367,7 @@ int dom_sid_string_buf(const struct dom_sid *sid, char 
*buf, int buflen)
uint32_t ia;
 
if (!sid) {
-   strlcpy(buf, (NULL SID), buflen);
-   return 10;  /* strlen((NULL SID)) */
+   return strlcpy(buf, (NULL SID), buflen);
}
 
ia = (sid-id_auth[5]) +
diff --git a/source3/include/ntioctl.h b/source3/include/ntioctl.h
index 41b1dce..18707c5 100644
--- a/source3/include/ntioctl.h
+++ b/source3/include/ntioctl.h
@@ -77,13 +77,12 @@
 /* For FSCTL_GET_SHADOW_COPY_DATA ...*/
 typedef char SHADOW_COPY_LABEL[25];
 
-typedef struct shadow_copy_data {
-   TALLOC_CTX *mem_ctx;
+struct shadow_copy_data {
/* Total number of shadow volumes currently mounted */
uint32 num_volumes;
/* Concatenated list of labels */
SHADOW_COPY_LABEL *labels;
-} SHADOW_COPY_DATA;
+};
 
 
 #endif /* _NTIOCTL_H */
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 5d6b512..4d06a10 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -84,7 +84,10 @@ static int vfswrap_set_quota(struct vfs_handle_struct 
*handle,  enum SMB_QUOTA_T
 #endif
 }
 
-static int vfswrap_get_shadow_copy_data(struct vfs_handle_struct *handle, 
struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
+static int vfswrap_get_shadow_copy_data(struct vfs_handle_struct *handle,
+   struct files_struct *fsp,
+   struct shadow_copy_data 
*shadow_copy_data,
+   bool labels)
 {
errno = ENOSYS;
return -1;  /* Not implemented. */
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index cb03413..3b9c20a 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -697,7 +697,8 @@ static int smb_full_audit_set_quota(struct 
vfs_handle_struct *handle,
 
 static int smb_full_audit_get_shadow_copy_data(struct vfs_handle_struct 
*handle,
struct files_struct *fsp,
-   SHADOW_COPY_DATA *shadow_copy_data, bool labels)
+   struct shadow_copy_data *shadow_copy_data,
+   bool labels)
 {
int result;
 
diff --git a/source3/modules/vfs_shadow_copy.c 
b/source3/modules/vfs_shadow_copy.c
index b93f98d..1db47d2 100644
--- a/source3/modules/vfs_shadow_copy.c
+++ b/source3/modules/vfs_shadow_copy.c
@@ -216,7 +216,10 @@ static int shadow_copy_closedir(vfs_handle_struct *handle, 
SMB_STRUCT_DIR *_dirp
return 0;   
 }
 
-static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, 
files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
+static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle,
+   files_struct *fsp,
+   struct shadow_copy_data 
*shadow_copy_data,
+   bool labels)
 {

[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Günther Deschner
The branch, master has been updated
   via  f103e0c s3: fix more -Wunused-but-set-variable build warnings.
  from  b9a727c Tiny simplification to dom_sid_string_buf

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


- Log -
commit f103e0c39f9f93b765a9cdb93a7600a1f6f06315
Author: Günther Deschner g...@samba.org
Date:   Tue May 31 13:24:09 2011 +0200

s3: fix more -Wunused-but-set-variable build warnings.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Wed Jun  1 00:29:30 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/lib/util_str.c  |3 ---
 source3/printing/tests/vlp.c|3 +--
 source3/rpc_server/spoolss/srv_spoolss_nt.c |3 +--
 source3/utils/net_rpc.c |3 ---
 4 files changed, 2 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 2a853c3..f039a3a 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -868,7 +868,6 @@ uint64_t STR_TO_SMB_BIG_UINT(const char *nptr, const char 
**entptr)
  */
 uint64_t conv_str_size(const char * str)
 {
-   uint64_t lval_orig;
 uint64_t lval;
char * end;
 
@@ -886,8 +885,6 @@ uint64_t conv_str_size(const char * str)
return lval;
}
 
-   lval_orig = lval;
-
if (strwicmp(end, K) == 0) {
lval *= 1024ULL;
} else if (strwicmp(end, M) == 0) {
diff --git a/source3/printing/tests/vlp.c b/source3/printing/tests/vlp.c
index b220506..927224c 100644
--- a/source3/printing/tests/vlp.c
+++ b/source3/printing/tests/vlp.c
@@ -111,10 +111,9 @@ static int next_jobnum(char *printer)
 static void set_printer_status(char *printer, int status)
 {
fstring keystr;
-   int result;
 
slprintf(keystr, sizeof(keystr) - 1, STATUS/%s, printer);
-   result = tdb_store_int32(tdb, keystr, status);
+   tdb_store_int32(tdb, keystr, status);
 }
 
 static int get_printer_status(char *printer)
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c 
b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index f7fa189..52e4ab0 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -4179,10 +4179,9 @@ static WERROR construct_printer_info6(TALLOC_CTX 
*mem_ctx,
  struct spoolss_PrinterInfo6 *r,
  int snum)
 {
-   int count;
print_status_struct status;
 
-   count = print_queue_length(msg_ctx, snum, status);
+   print_queue_length(msg_ctx, snum, status);
 
r-status = nt_printq_status(status.status);
 
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index a3ce531..849eec3 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -6501,7 +6501,6 @@ static int rpc_trustdom_vampire(struct net_context *c, 
int argc,
struct rpc_pipe_client *pipe_hnd = NULL;
NTSTATUS nt_status, result;
const char *domain_name = NULL;
-   struct dom_sid *queried_dom_sid;
struct policy_handle connect_hnd;
union lsa_PolicyInformation *info = NULL;
 
@@ -6594,8 +6593,6 @@ static int rpc_trustdom_vampire(struct net_context *c, 
int argc,
return -1;
}
 
-   queried_dom_sid = info-account_domain.sid;
-
/*
 * Keep calling LsaEnumTrustdom over opened pipe until
 * the end of enumeration is reached


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Andrew Bartlett
The branch, master has been updated
   via  00577e9 librpc/ndr: Use converted_size to determine if NULL 
termination was sent
   via  08abd1f librpc/ndr: add new LIBNDR_FLAG_STR_RAW8 for ndr_pull_string
   via  c51795c librpc/ndr: consolidate string conversion logic in 
ndr_pull_string
  from  f103e0c s3: fix more -Wunused-but-set-variable build warnings.

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


- Log -
commit 00577e9a3ad7d126b6f58b54d1888d696b8cc9b4
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 31 20:21:37 2011 +1000

librpc/ndr: Use converted_size to determine if NULL termination was sent

This is better than doing a strlen() on the string, as that huristic
only worked for ASCII strings.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Wed Jun  1 01:42:22 CEST 2011 on sn-devel-104

commit 08abd1f5e851c4f40a863f5c3ff6acc93d691efb
Author: Sean Finney sean...@seanius.net
Date:   Tue May 31 09:49:19 2011 +0200

librpc/ndr: add new LIBNDR_FLAG_STR_RAW8 for ndr_pull_string

Introduce a new flag, LIBNDR_FLAG_STR_RAW8, which indicates that libndr
should not attempt to convert the corresponding byte sequence, and place
the responsibility on the caller to do so later.

This is needed in cases where the string is known to be 8-bit and either
NULL terminated or of known length, but in an unspecified character set.
For example, when pulling PT_STRING8 properties from an exchange server
via libmapi + libndr, the codepage is neither known nor in the control
of the caller, and is determined by subsequent properties requested from
the server.  Therefore the client would like to fetch all properties in
one large batch, and convert the resulting strings locally.

This commit also includes some (basic) tests of each of the flags'
respective behaviors with the ndr push/pull string functions, in a new
source4 torture test suite ndr.ndr_string.

Signed-off-by: Sean Finney sean...@seanius.net

commit c51795c747198f9e002505ffa39ad710beff0358
Author: Sean Finney sean...@seanius.net
Date:   Tue May 31 09:49:18 2011 +0200

librpc/ndr: consolidate string conversion logic in ndr_pull_string

Reduce the amount of duplicate code in ndr_pull_string by moving the
almost duplicate conversion calls and their corresponding NDR pulls and
checks to a single location.  In the place of the removed calls is logic
allowing the conversion to be generalized, and and any specific
pulls/checks that do not apply to the general case.

This is similar to what has already been done in the switch statement
for ndr_push_string.

Signed-off-by: Sean Finney sean...@seanius.net

---

Summary of changes:
 librpc/idl/idl_types.h|6 +
 librpc/ndr/libndr.h   |1 +
 librpc/ndr/ndr_string.c   |  265 ++---
 source4/torture/ndr/ndr.c |1 +
 source4/torture/ndr/string.c  |  199 +++
 source4/torture/wscript_build |2 +-
 6 files changed, 295 insertions(+), 179 deletions(-)
 create mode 100644 source4/torture/ndr/string.c


Changeset truncated at 500 lines:

diff --git a/librpc/idl/idl_types.h b/librpc/idl/idl_types.h
index 023c040..c50efac 100644
--- a/librpc/idl/idl_types.h
+++ b/librpc/idl/idl_types.h
@@ -8,6 +8,7 @@
 #define STR_CONFORMANT  LIBNDR_FLAG_STR_CONFORMANT
 #define STR_CHARLENLIBNDR_FLAG_STR_CHARLEN
 #define STR_UTF8   LIBNDR_FLAG_STR_UTF8
+#define STR_RAW8   LIBNDR_FLAG_STR_RAW8
 
 /*
   a null terminated UCS2 string
@@ -25,6 +26,11 @@
 #define utf8string [flag(STR_UTF8|STR_NULLTERM)] string
 
 /*
+  a null terminated raw string (null terminated byte sequence)
+*/
+#define raw8string [flag(STR_RAW8|STR_NULLTERM)] string
+
+/*
   a null terminated UCS2 string
 */
 #define nstring_array  [flag(STR_NULLTERM|NDR_ALIGN2)] string_array
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index cbe9b40..ca3710b 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -122,6 +122,7 @@ struct ndr_print {
 #define LIBNDR_FLAG_STR_CONFORMANT (110)
 #define LIBNDR_FLAG_STR_CHARLEN(111)
 #define LIBNDR_FLAG_STR_UTF8   (112)
+#define LIBNDR_FLAG_STR_RAW8   (113)
 #define LIBNDR_STRING_FLAGS(0x7FFC)
 
 /* set if relative pointers should *not* be marshalled in reverse order */
diff --git a/librpc/ndr/ndr_string.c b/librpc/ndr/ndr_string.c
index 6e20333..cf4d972 100644
--- a/librpc/ndr/ndr_string.c
+++ b/librpc/ndr/ndr_string.c
@@ -30,8 +30,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull 
*ndr, int ndr_flags,
char *as=NULL;
uint32_t len1, ofs, len2;
uint16_t len3;
-   size_t 

[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Michael Adam
The branch, master has been updated
   via  697d5c0 s3:doc: update the ldap_user_dn documentation in the 
idmap_ldap manpage
   via  74cd06b s3:idmap_ldap: allow creation of ldap stored mappings for 
explicitly configured domains.
   via  dea3ef1 s3:idmap_ldap: rename idmap_ldap_get_new_id to 
idmap_ldap_allocate_id
   via  2de65b9 s3:idmap_ldap: rename idmap_ldap_allocate_id to 
idmap_ldap_allocate_id_internal
   via  5882d3e idmap_ldap.8: Add example with readonly backend
  from  00577e9 librpc/ndr: Use converted_size to determine if NULL 
termination was sent

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


- Log -
commit 697d5c08acc85944df8ca9f26ab3f58bb3e7764a
Author: Michael Adam ob...@samba.org
Date:   Wed Jun 1 01:19:50 2011 +0200

s3:doc: update the ldap_user_dn documentation in the idmap_ldap manpage

also extend the example with ldap_user_dn.

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Wed Jun  1 02:53:32 CEST 2011 on sn-devel-104

commit 74cd06b3dff42bda4dd0a0f3fd250a975d0258ed
Author: Michael Adam ob...@samba.org
Date:   Wed Jun 1 00:30:11 2011 +0200

s3:idmap_ldap: allow creation of ldap stored mappings for explicitly 
configured domains.

After the preparations, this is achieved by using 
idmap_ldap_allocate_id_internal()
as get_new_id rw method instead of idmap_ldap_allocate_id().

commit dea3ef1ab689a3d01846147d2a83377b09335f8f
Author: Michael Adam ob...@samba.org
Date:   Wed Jun 1 00:25:23 2011 +0200

s3:idmap_ldap: rename idmap_ldap_get_new_id to idmap_ldap_allocate_id

This is in preparation of allowing allocating ldap based domain-specific 
configs.

commit 2de65b97b98e2c8cc218b60da749ac17195d8413
Author: Michael Adam ob...@samba.org
Date:   Wed Jun 1 00:25:23 2011 +0200

s3:idmap_ldap: rename idmap_ldap_allocate_id to 
idmap_ldap_allocate_id_internal

This is in preparation of allowing allocating ldap based domain-specific 
configs.

commit 5882d3eba3d7a82234d09a6ccb8c64e81a6240d9
Author: Luk Claes l...@debian.org
Date:   Tue May 31 23:28:57 2011 +0200

idmap_ldap.8: Add example with readonly backend

Signed-off-by: Luk Claes l...@debian.org
Signed-off-by: Michael Adam ob...@samba.org

---

Summary of changes:
 docs-xml/manpages-3/idmap_ldap.8.xml |   36 +++--
 source3/winbindd/idmap_ldap.c|   18 
 2 files changed, 42 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/idmap_ldap.8.xml 
b/docs-xml/manpages-3/idmap_ldap.8.xml
index 4cbfe84..2c0fcfd 100644
--- a/docs-xml/manpages-3/idmap_ldap.8.xml
+++ b/docs-xml/manpages-3/idmap_ldap.8.xml
@@ -48,8 +48,14 @@
varlistentry
termldap_user_dn = DN/term
listitempara
-   Defines the user DN to be used for authentication. If 
absent an
-   anonymous bind will be performed.
+   Defines the user DN to be used for authentication.
+   The secret for authenticating this user should be
+   stored with net idmap secret
+   (see citerefentryrefentrytitlenet/refentrytitle
+   manvolnum8/manvolnum/citerefentry).
+   If absent, the ldap credentials from the ldap passdb 
configuration
+   are used, and if these are also absent, an anonymous
+   bind will be performed as last fallback.
/para/listitem
/varlistentry
 
@@ -78,7 +84,8 @@
para
The following example shows how an ldap directory is used as the 
default idmap backend. It also configures the idmap range and base 
-   directory suffix.
+   directory suffix. The secret for the ldap_user_dn has to be set with
+   quot;net idmap secret '*' passwordquot;.
/para
 
programlisting
@@ -87,6 +94,29 @@
idmap config * : range= 100-199
idmap config * : ldap_url = ldap://localhost/
idmap config * : ldap_base_dn = ou=idmap,dc=example,dc=com
+   idmap config * : ldap_user_dn = cn=idmap_admin,dc=example,dc=com
+   /programlisting
+
+   para
+   This example shows how ldap can be used as a readonly backend while
+   tdb is the default backend used to store the mappings.
+   It adds an explicit configuration for some domain DOM1, that
+   uses the ldap idmap backend. Note that a range disjoint from the
+   default range is used.
+   /para
+
+   programlisting
+   [global]
+   # backend = tdb is redundant here since it is the default
+   idmap config * : backend = tdb
+   idmap config * : range = 100-199
+
+   idmap config 

[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Jeremy Allison
The branch, master has been updated
   via  c7d2f6d Remove the char * argument from the SMB_VFS_GETWD() call. 
Now always returns malloc'ed memory.
   via  1cee717 Change sys_getcd() to take no arguments and always return 
malloc'ed memory (or NULL).
   via  5abab13 Add check for the getcwd function being able to take NULL,0 
arguments.
   via  313bb1f Split the ACE flag mapping between nfs4 and Windows into 
two separate functions rather than trying to do it inline. Allows us to 
carefully control what flags are mapped to what in one place. Modification to 
bug #8191 - vfs_gpfs dosn't honor ACE_FLAG_INHERITED_ACE
  from  697d5c0 s3:doc: update the ldap_user_dn documentation in the 
idmap_ldap manpage

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


- Log -
commit c7d2f6d35a95678c91faf0b5ac7f83bc5d1abfde
Author: Jeremy Allison j...@samba.org
Date:   Tue May 31 16:36:06 2011 -0700

Remove the char * argument from the SMB_VFS_GETWD() call. Now always
returns malloc'ed memory.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Wed Jun  1 04:06:12 CEST 2011 on sn-devel-104

commit 1cee71713f75dbee653ea86bd4e7c87efe677cf6
Author: Jeremy Allison j...@samba.org
Date:   Tue May 31 16:14:04 2011 -0700

Change sys_getcd() to take no arguments and always return malloc'ed memory 
(or NULL).

Part of the efforts to remove PATH_MAX on modern systems.

commit 5abab13851ff2fc3a5792d08cc753c9b479c8cc1
Author: Jeremy Allison j...@samba.org
Date:   Tue May 31 15:38:55 2011 -0700

Add check for the getcwd function being able to take NULL,0 arguments.

commit 313bb1fb9c87084084439c6b45e4c01e82e3f9ec
Author: Jeremy Allison j...@samba.org
Date:   Tue May 31 15:37:30 2011 -0700

Split the ACE flag mapping between nfs4 and Windows
into two separate functions rather than trying to do
it inline. Allows us to carefully control what flags
are mapped to what in one place. Modification to
bug #8191 - vfs_gpfs dosn't honor ACE_FLAG_INHERITED_ACE

---

Summary of changes:
 examples/VFS/skel_opaque.c   |2 +-
 examples/VFS/skel_transparent.c  |4 +-
 source3/client/client.c  |5 ++-
 source3/configure.in |   11 ++
 source3/include/proto.h  |2 +-
 source3/include/vfs.h|5 ++-
 source3/include/vfs_macros.h |8 ++--
 source3/lib/system.c |   41 +
 source3/modules/nfs4_acls.c  |   73 ++---
 source3/modules/vfs_default.c|4 +-
 source3/modules/vfs_full_audit.c |8 ++--
 source3/modules/vfs_time_audit.c |4 +-
 source3/printing/print_generic.c |   16 
 source3/smbd/vfs.c   |   17 +
 source3/torture/cmd_vfs.c|5 ++-
 source3/wscript  |   10 +
 16 files changed, 156 insertions(+), 59 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index f60f0fe..f839993 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -293,7 +293,7 @@ static int skel_chdir(vfs_handle_struct *handle,  const 
char *path)
return -1;
 }
 
-static char *skel_getwd(vfs_handle_struct *handle,  char *buf)
+static char *skel_getwd(vfs_handle_struct *handle)
 {
errno = ENOSYS;
return NULL;
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index f06e02a..7c91a61 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -280,9 +280,9 @@ static int skel_chdir(vfs_handle_struct *handle,  const 
char *path)
return SMB_VFS_NEXT_CHDIR(handle, path);
 }
 
-static char *skel_getwd(vfs_handle_struct *handle,  char *buf)
+static char *skel_getwd(vfs_handle_struct *handle)
 {
-   return SMB_VFS_NEXT_GETWD(handle, buf);
+   return SMB_VFS_NEXT_GETWD(handle);
 }
 
 static int skel_ntimes(vfs_handle_struct *handle,
diff --git a/source3/client/client.c b/source3/client/client.c
index 7cffddb..f088c7c 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3876,11 +3876,12 @@ static int cmd_lcd(void)
buf, strerror(errno));
}
}
-   d = TALLOC_ARRAY(ctx, char, PATH_MAX+1);
+   d = sys_getwd();
if (!d) {
return 1;
}
-   DEBUG(2,(the local directory is now %s\n,sys_getwd(d)));
+   DEBUG(2,(the local directory is now %s\n,d));
+   SAFE_FREE(d);
return 0;
 }
 
diff --git a/source3/configure.in b/source3/configure.in
index e1e2d39..12d083b 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2602,6 +2602,17 @@ if test x$samba_cv_HAVE_LINUX_FALLOCATE64 = xyes  
test x$ac_cv_func_fallo
 AC_DEFINE(HAVE_LINUX_FALLOCATE64,1,[Whether the Linux 

autobuild: test mail

2011-05-31 Thread autobuild
This is a test mail to samba-cvs from the autobuild user.

In future autobuild intermittent test failures will be reported from this
user.


[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Andrew Bartlett
The branch, master has been updated
   via  5a8218b s3-param Make lp_ncalrpc_dir() const
   via  b9d61ef s3-param Make lp_dedicated_keytab_file() const
   via  edc3041 s3-param Make lp_realm() const
   via  860b437 s3-param Make lp_name_resolv_order() const
   via  08a72f3 s3-param Make lp_utmpdir() and lp_wtmpdir const
   via  47ece3f s3-param Make lp_piddir() const
   via  a0758bb s3-param Make lp_cachedir() const
   via  9aef68f s3-param Make lp_statedir() const
   via  5f17637 s3-param Make lp_lockdir() const
   via  f331936 s3-param Make lp_smb_passwd_file() and lp_private_dir() 
const
   via  a74e7fb s3-param Make lp_smb_ports() const
   via  f52b97a s3-param Make charset parameters const
   via  ec9ff19 s3-param Make lp_passwordserver() const.
   via  7630e73 s3-param prepare for some lp_ functions to return const
  from  c7d2f6d Remove the char * argument from the SMB_VFS_GETWD() call. 
Now always returns malloc'ed memory.

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


- Log -
commit 5a8218b147ac62c065903591a15360a906da9bec
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 12:18:00 2011 +1000

s3-param Make lp_ncalrpc_dir() const

This disables % substitutions in the 'ncalrpc dir' parameter.  This is
used as a communication point between multiple parts of the codebase,
and needs to be internally consistent between all the Samba tasks.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Wed Jun  1 05:30:53 CEST 2011 on sn-devel-104

commit b9d61ef55a45bc58d7e0c6dae0969cf938974020
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 12:15:48 2011 +1000

s3-param Make lp_dedicated_keytab_file() const

This disables % substitutions in the 'dedicated keytab file' parameter.

Andrew Bartlett

commit edc3041093b17ae6e18c5b7a64a94b5bfb3c3998
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 11:55:59 2011 +1000

s3-param Make lp_realm() const

This disables % substitutions in the 'realm' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett

commit 860b43737c0544cf651c2e93a30ca65f3f347219
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 11:54:52 2011 +1000

s3-param Make lp_name_resolv_order() const

This disables % substitutions in the 'name resolv order' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett

commit 08a72f3a1571649eb52c7e06bab2789e0887c173
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 11:53:21 2011 +1000

s3-param Make lp_utmpdir() and lp_wtmpdir const

This disables % substitutions in the 'utmp dir' and 'wtmp dir'
parameters.  These are system paths, and need to be consistent between
all the Samba tasks.

Andrew Bartlett

commit 47ece3f897305970999fbcf012229105838c3687
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 11:52:07 2011 +1000

s3-param Make lp_piddir() const

This disables % substitutions in the 'pid dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett

commit a0758bb5e5035a2547808a1fc89fe4fef51ed90c
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 11:51:12 2011 +1000

s3-param Make lp_cachedir() const

This disables % substitutions in the 'cache dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett

commit 9aef68f4c2791227186fa81f1ec19c40df435e18
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 11:48:38 2011 +1000

s3-param Make lp_statedir() const

This disables % substitutions in the 'state dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett

commit 5f176378a802703778ae07c36e95fe186b6e57a8
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 11:45:44 2011 +1000

s3-param Make lp_lockdir() const

This disables % substitutions in the 'lock dir' parameter.  This is
used all over the codebase, and needs to be internally consistent
for the life of the process, as they determine the location of
our locking databases.

Andrew Bartlett

commit f331936db2990589047edd4aee61ac298262123d
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 1 11:19:21 2011 +1000

s3-param Make lp_smb_passwd_file() and lp_private_dir() const

This disables % substitutions in the 'smb passwd file' and 'private
dir' parameters.  These are used all over the codebase, 

[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Andrew Tridgell
The branch, master has been updated
   via  f725e2b build: fixed a problem with installing scripts in the build 
tree
  from  5a8218b s3-param Make lp_ncalrpc_dir() const

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


- Log -
commit f725e2b64eec48c0fe21a125065152c684d361ee
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 1 11:43:52 2011 +1000

build: fixed a problem with installing scripts in the build tree

the SAMBA_SCRIPT() function was not always triggering correctly. The
base problem was that we were using a target outside the build
tree. This implements a simpler solution where we just create the
links directly in SAMBA_SCRIPT() rather than creating a waf task

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jun  1 06:50:04 CEST 2011 on sn-devel-104

---

Summary of changes:
 buildtools/wafsamba/wafsamba.py |   27 +--
 1 files changed, 9 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 2a1c82a..43b7f61 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -628,17 +628,6 @@ def ENABLE_TIMESTAMP_DEPENDENCIES(conf):
 Utils.h_file = h_file
 
 
-
-t = Task.simple_task_type('copy_script', 'rm -f ${LINK_TARGET}  ln -s 
${SRC[0].abspath(env)} ${LINK_TARGET}',
-  shell=True, color='PINK', ext_in='.bin')
-t.quiet = True
-
-@feature('copy_script')
-@before('apply_link')
-def copy_script(self):
-tsk = self.create_task('copy_script', self.allnodes[0])
-tsk.env.TARGET = self.target
-
 def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None):
 '''used to copy scripts from the source tree into the build directory
for use by selftest'''
@@ -653,15 +642,17 @@ def SAMBA_SCRIPT(bld, name, pattern, installdir, 
installname=None):
 target = os.path.join(installdir, iname)
 tgtdir = os.path.dirname(os.path.join(bld.srcnode.abspath(bld.env), 
'..', target))
 mkdir_p(tgtdir)
-t = bld(features='copy_script',
-source   = s,
-target   = target,
-always   = True,
-install_path = None)
-t.env.LINK_TARGET = target
-
+link_src = os.path.normpath(os.path.join(bld.curdir, s))
+link_dst = os.path.join(tgtdir, os.path.basename(iname))
+if os.path.islink(link_dst) and os.readlink(link_dst) == link_src:
+continue
+if os.path.exists(link_dst):
+os.unlink(link_dst)
+Logs.info(symlink: %s - %s/%s % (s, installdir, iname))
+os.symlink(link_src, link_dst)
 Build.BuildContext.SAMBA_SCRIPT = SAMBA_SCRIPT
 
+
 def copy_and_fix_python_path(task):
 pattern='sys.path.insert(0, bin/python)'
 if task.env[PYTHONARCHDIR] in sys.path and task.env[PYTHONDIR] in 
sys.path:


-- 
Samba Shared Repository