autobuild: intermittent test failure detected

2011-04-01 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-02-0625/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-02-0625/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-02-0625/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-02-0625/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-02-0625/samba4.stdout
  
The top commit at the time of the failure was:

commit d143bc444c10df99b2dd64f4a0e02c902c3c024e
Author: Michael Adam 
Date:   Sat Apr 2 02:20:49 2011 +0200

s3:waf: add cluster support / ctdb checks.

The checks are roughtly taken from the autoconf ctdb checks.

I was not able to implement checks with CHECK_DECL, CHECK_TYPE,
CHECK_HEADER and friends, because the ctdb headers seem to need too
special a setup of includes and defines in order to compile.
So I used CHECK_CODE() in all checks.

In the long run, this should be changed.

I supported a --with-ctdb-dir options to allow for building
against a ctdb that is not installed into /usr (e.g. against
a local git checkout). In order to implement this, I had to
hand includes in to the CHECK_CODE function.
Here I found a problem with CHECK_CODE (or even the core waf
conf.check() function: The CHECK_CODE function does not
expand the includes it gets (i.e. '#' is not expanded to the
base dir, and relative paths are left relative). But the core
check() function seems to ignore all include paths that are
not absolute paths. Hence in particular the usual default '# .'
for the includes is useless. So I preprocessed the list of includes
for the cluster checks. But I assume that it would be useful
to move this expansion into CHECK_CODE or even into the core
waf check function.

Autobuild-User: Michael Adam 
Autobuild-Date: Sat Apr  2 03:26:55 CEST 2011 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2011-04-01 Thread Michael Adam
The branch, master has been updated
   via  d143bc4 s3:waf: add cluster support / ctdb checks.
   via  af82dca s3:waf:compare_config_h3.sh: make diff tool configurable as 
env var "DIFF"
   via  e06dba1 s3:waf:compare_config_h3.sh: specify autoconf-config.h as 
commandline parameter
  from  00224d0 Fix bug #7987 - ACL can get lost when files are being 
renamed.

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


- Log -
commit d143bc444c10df99b2dd64f4a0e02c902c3c024e
Author: Michael Adam 
Date:   Sat Apr 2 02:20:49 2011 +0200

s3:waf: add cluster support / ctdb checks.

The checks are roughtly taken from the autoconf ctdb checks.

I was not able to implement checks with CHECK_DECL, CHECK_TYPE,
CHECK_HEADER and friends, because the ctdb headers seem to need too
special a setup of includes and defines in order to compile.
So I used CHECK_CODE() in all checks.

In the long run, this should be changed.

I supported a --with-ctdb-dir options to allow for building
against a ctdb that is not installed into /usr (e.g. against
a local git checkout). In order to implement this, I had to
hand includes in to the CHECK_CODE function.
Here I found a problem with CHECK_CODE (or even the core waf
conf.check() function: The CHECK_CODE function does not
expand the includes it gets (i.e. '#' is not expanded to the
base dir, and relative paths are left relative). But the core
check() function seems to ignore all include paths that are
not absolute paths. Hence in particular the usual default '# .'
for the includes is useless. So I preprocessed the list of includes
for the cluster checks. But I assume that it would be useful
to move this expansion into CHECK_CODE or even into the core
waf check function.

Autobuild-User: Michael Adam 
Autobuild-Date: Sat Apr  2 03:26:55 CEST 2011 on sn-devel-104

commit af82dcae302934c4ea9c14a5932a4647444f0a63
Author: Michael Adam 
Date:   Sat Apr 2 00:33:52 2011 +0200

s3:waf:compare_config_h3.sh: make diff tool configurable as env var "DIFF"

commit e06dba158996909228834b9302cc56e4e1006d99
Author: Michael Adam 
Date:   Sat Apr 2 00:29:51 2011 +0200

s3:waf:compare_config_h3.sh: specify autoconf-config.h as commandline 
parameter

---

Summary of changes:
 buildtools/compare_config_h3.sh |   15 ++-
 source3/wscript |  196 +++
 2 files changed, 207 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/compare_config_h3.sh b/buildtools/compare_config_h3.sh
index 0f640a9..294af30 100755
--- a/buildtools/compare_config_h3.sh
+++ b/buildtools/compare_config_h3.sh
@@ -3,10 +3,17 @@
 # compare the generated config.h from a waf build with existing samba
 # build
 
+OLD_CONFIG=$HOME/samba_old/source3/include/config.h
+if test "x$1" != "x" ; then
+   OLD_CONFIG=$1
+fi
+
+if test "x$DIFF" = "x" ; then
+   DIFF="comm -23"
+fi
+
 grep "^.define" bin/default/source3/include/config.h | sort > waf-config.h
-grep "^.define" $HOME/samba_old/source3/include/config.h | sort > old-config.h
+grep "^.define" $OLD_CONFIG | sort > old-config.h
 
-comm -23 old-config.h waf-config.h
+$DIFF old-config.h waf-config.h
 
-#echo
-#diff -u old-config.h waf-config.h
diff --git a/source3/wscript b/source3/wscript
index e8bd625..e6e0b5a 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -60,6 +60,16 @@ def set_options(opt):
 opt.SAMBA3_ADD_OPTION('automount')
 opt.SAMBA3_ADD_OPTION('aio-support')
 
+opt.SAMBA3_ADD_OPTION('cluster-support')
+
+opt.add_option('--with-ctdb-dir',
+   help=("Directory under which ctdb is installed"),
+   action="store", dest='ctdb_dir', default=None)
+opt.add_option('--enable-old-ctdb',
+  help=("enable building against (too) old version of ctdb 
(default=false)"),
+  action="store_true", dest='enable_old_ctdb', default=False)
+
+
 
 def configure(conf):
 from samba_utils import TO_LIST
@@ -1496,6 +1506,192 @@ main() {
 # For sys/quota.h and linux/quota.h
 conf.CHECK_HEADERS('sys/quota.h')
 
+
+#
+# checking for clustering extensions (CTDB)
+#
+if not Options.options.with_cluster_support:
+have_cluster_support = False
+
+else:
+
+if Options.options.ctdb_dir:
+conf.ADD_EXTRA_INCLUDES(Options.options.ctdb_dir + '/include')
+
+srcdir = os.path.realpath(conf.srcdir)
+if 'EXTRA_INCLUDES' in conf.env:
+includes = ' '.join(conf.env['EXTRA_INCLUDES']).replace('#', 
srcdir + '/')
+else:
+includes = ''
+
+have_cluster_support = True
+ctdb_broken = ""
+
+conf.CHECK_CODE('''
+#define NO_CONFIG_H
+#i

[SCM] Samba Shared Repository - branch master updated

2011-04-01 Thread Jeremy Allison
The branch, master has been updated
   via  00224d0 Fix bug #7987 - ACL can get lost when files are being 
renamed.
  from  ac216c1 Fix bug #8047 - mdns registration doesn't work if 
"interfaces" is used in smb.conf

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


- Log -
commit 00224d06c389e9744b83bcec09a9d002086058fc
Author: Jeremy Allison 
Date:   Fri Apr 1 16:50:28 2011 -0700

Fix bug #7987 - ACL can get lost when files are being renamed.

There is no reason for smbd with Windows ACLs to use chmod
or fchmod unless it's a file opened with UNIX extensions or
with posix pathnames.

Autobuild-User: Jeremy Allison 
Autobuild-Date: Sat Apr  2 02:40:43 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/modules/vfs_acl_common.c |   40 ++
 source3/modules/vfs_acl_tdb.c|6 -
 source3/modules/vfs_acl_xattr.c  |4 +++
 3 files changed, 49 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index b3e9973..827c954 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -1020,3 +1020,43 @@ static int unlink_acl_common(struct vfs_handle_struct 
*handle,
smb_fname->base_name,
false);
 }
+
+static int chmod_acl_module_common(struct vfs_handle_struct *handle,
+   const char *path, mode_t mode)
+{
+   if (lp_posix_pathnames()) {
+   /* Only allow this on POSIX pathnames. */
+   return SMB_VFS_NEXT_CHMOD(handle, path, mode);
+   }
+   return 0;
+}
+
+static int fchmod_acl_module_common(struct vfs_handle_struct *handle,
+   struct files_struct *fsp, mode_t mode)
+{
+   if (fsp->posix_open) {
+   /* Only allow this on POSIX opens. */
+   return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode);
+   }
+   return 0;
+}
+
+static int chmod_acl_acl_module_common(struct vfs_handle_struct *handle,
+   const char *name, mode_t mode)
+{
+   if (lp_posix_pathnames()) {
+   /* Only allow this on POSIX pathnames. */
+   return SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode);
+   }
+   return 0;
+}
+
+static int fchmod_acl_acl_module_common(struct vfs_handle_struct *handle,
+   struct files_struct *fsp, mode_t mode)
+{
+   if (fsp->posix_open) {
+   /* Only allow this on POSIX opens. */
+   return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
+   }
+   return 0;
+}
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 7a9e10d..17cf493 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -401,13 +401,17 @@ static struct vfs_fn_pointers vfs_acl_tdb_fns = {
.disconnect = disconnect_acl_tdb,
.opendir = opendir_acl_common,
.mkdir = mkdir_acl_common,
+   .rmdir = rmdir_acl_tdb,
.open = open_acl_common,
.create_file = create_file_acl_common,
.unlink = unlink_acl_tdb,
-   .rmdir = rmdir_acl_tdb,
+   .chmod = chmod_acl_module_common,
+   .fchmod = fchmod_acl_module_common,
.fget_nt_acl = fget_nt_acl_common,
.get_nt_acl = get_nt_acl_common,
.fset_nt_acl = fset_nt_acl_common,
+   .chmod_acl = chmod_acl_acl_module_common,
+   .fchmod_acl = fchmod_acl_acl_module_common,
.sys_acl_set_file = sys_acl_set_file_tdb,
.sys_acl_set_fd = sys_acl_set_fd_tdb
 };
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index 213ba9a..90959f3 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -209,9 +209,13 @@ static struct vfs_fn_pointers vfs_acl_xattr_fns = {
.open = open_acl_common,
.create_file = create_file_acl_common,
.unlink = unlink_acl_common,
+   .chmod = chmod_acl_module_common,
+   .fchmod = fchmod_acl_module_common,
.fget_nt_acl = fget_nt_acl_common,
.get_nt_acl = get_nt_acl_common,
.fset_nt_acl = fset_nt_acl_common,
+   .chmod_acl = chmod_acl_acl_module_common,
+   .fchmod_acl = fchmod_acl_acl_module_common,
.sys_acl_set_file = sys_acl_set_file_xattr,
.sys_acl_set_fd = sys_acl_set_fd_xattr
 };


-- 
Samba Shared Repository


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

2011-04-01 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  8421f04 Fix bug #8047 - mdns registration doesn't work if 
"interfaces" is used in smb.conf
  from  2b4ddf3 s3-winbindd: Use the correct enums for 
samr_QueryDomainInfo. (cherry picked from commit 
d9ad60f0dc40be1e1d533f96ec0032e01035d85b)

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


- Log -
commit 8421f046512c958ddb79f7ee8552dedfc870350b
Author: Marc A. Dahlhaus 
Date:   Fri Apr 1 13:26:31 2011 -0700

Fix bug #8047 - mdns registration doesn't work if "interfaces" is used in 
smb.conf

Autobuild-User: Jeremy Allison 
Autobuild-Date: Fri Apr  1 23:15:34 CEST 2011 on sn-devel-104
(cherry picked from commit ac216c130e5d1f1c86d7e481838748208bb68f73)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index e8c1169..da95b45 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -677,6 +677,13 @@ static bool open_sockets_smbd(struct smbd_parent_context 
*parent,
continue;
}
 
+   /* Keep the first port for mDNS service
+* registration.
+*/
+   if (dns_port == 0) {
+   dns_port = port;
+   }
+
if (!smbd_open_one_socket(parent, ifss, port)) {
return false;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-04-01 Thread Jeremy Allison
The branch, master has been updated
   via  ac216c1 Fix bug #8047 - mdns registration doesn't work if 
"interfaces" is used in smb.conf
  from  1272758 s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT

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


- Log -
commit ac216c130e5d1f1c86d7e481838748208bb68f73
Author: Marc A. Dahlhaus 
Date:   Fri Apr 1 13:26:31 2011 -0700

Fix bug #8047 - mdns registration doesn't work if "interfaces" is used in 
smb.conf

Autobuild-User: Jeremy Allison 
Autobuild-Date: Fri Apr  1 23:15:34 CEST 2011 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index e9332c1..1948077 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -681,6 +681,13 @@ static bool open_sockets_smbd(struct smbd_parent_context 
*parent,
continue;
}
 
+   /* Keep the first port for mDNS service
+* registration.
+*/
+   if (dns_port == 0) {
+   dns_port = port;
+   }
+
if (!smbd_open_one_socket(parent, ifss, port)) {
return false;
}


-- 
Samba Shared Repository


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

2011-04-01 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  90e7f31 Fix bug #7996 - sgid bit lost on folder rename.
  from  64be11d s3: use getgrset() when it is available

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


- Log -
commit 90e7f310ec52119359784899945f47d0a9c4e3ae
Author: Jeremy Allison 
Date:   Thu Mar 31 10:49:22 2011 -0700

Fix bug #7996 - sgid bit lost on folder rename.

Refuse to set dos attributes into unix mode bits on such a
folder.

---

Summary of changes:
 source3/include/proto.h   |1 +
 source3/smbd/dosmode.c|   22 ++
 source3/smbd/posix_acls.c |2 +-
 3 files changed, 24 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index a261310..6ff0882 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6752,6 +6752,7 @@ uint32_t map_canon_ace_perms(int snum,
 mode_t perms,
 bool directory_ace);
 NTSTATUS unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 
security_info_sent, const SEC_DESC *psd);
+bool current_user_in_group(gid_t gid);
 SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
 NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
   SEC_DESC **ppdesc);
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 74f54a0..94caaf6 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -793,6 +793,28 @@ int file_set_dosmode(connection_struct *conn, struct 
smb_filename *smb_fname,
unixmode |= (smb_fname->st.st_ex_mode & 
(S_IWUSR|S_IWGRP|S_IWOTH));
}
 
+   /*
+* From the chmod 2 man page:
+*
+* "If the calling process is not privileged, and the group of the file
+* does not match the effective group ID of the process or one of its
+* supplementary group IDs, the S_ISGID bit will be turned off, but
+* this will not cause an error to be returned."
+*
+* Simply refuse to do the chmod in this case.
+*/
+
+   if (S_ISDIR(smb_fname->st.st_ex_mode) && (unixmode & S_ISGID) &&
+   geteuid() != sec_initial_uid() &&
+   !current_user_in_group(smb_fname->st.st_ex_gid)) {
+   DEBUG(3,("file_set_dosmode: setgid bit cannot be "
+   "set for directory %s\n",
+   smb_fname_str_dbg(smb_fname)));
+   errno = EPERM;
+   return -1;
+   }
+
+
ret = SMB_VFS_CHMOD(conn, smb_fname->base_name, unixmode);
if (ret == 0) {
if(!newfile || (lret != -1)) {
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index aaca9f4..714a4d3 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2644,7 +2644,7 @@ static canon_ace *canonicalise_acl(struct 
connection_struct *conn,
  Check if the current user group list contains a given group.
 /
 
-static bool current_user_in_group(gid_t gid)
+bool current_user_in_group(gid_t gid)
 {
int i;
 


-- 
Samba Shared Repository


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

2011-04-01 Thread Andreas Schneider
The branch, v3-6-test has been updated
   via  2b4ddf3 s3-winbindd: Use the correct enums for 
samr_QueryDomainInfo. (cherry picked from commit 
d9ad60f0dc40be1e1d533f96ec0032e01035d85b)
   via  b2532c5 s3-net: Do not use uninitialized value
  from  bf65a3a s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT

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


- Log -
commit 2b4ddf387cf2b4a9958643930c4ac12b48dd45ba
Author: Andreas Schneider 
Date:   Wed Mar 30 11:08:31 2011 +0200

s3-winbindd: Use the correct enums for samr_QueryDomainInfo.
(cherry picked from commit d9ad60f0dc40be1e1d533f96ec0032e01035d85b)

commit b2532c5eb6d23d043590fbf1c51ee7bef699fd11
Author: Sumit Bose 
Date:   Thu Mar 31 14:09:45 2011 +0200

s3-net: Do not use uninitialized value

s3-net: Do not use uninitialized value

Signed-off-by: Andreas Schneider 

Autobuild-User: Andreas Schneider 
Autobuild-Date: Thu Mar 31 18:09:57 CEST 2011 on sn-devel-104
(cherry picked from commit 34ea813553368a7f0805693c9731e9b0abfefa99)

---

Summary of changes:
 source3/utils/net_rpc.c   |2 ++
 source3/winbindd/winbindd_msrpc.c |4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 3fbeb87..c86127e 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -6737,6 +6737,8 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
return -1;
};
 
+   b = pipe_hnd->binding_handle;
+
nt_status = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, false, 
KEY_QUERY_VALUE,
&connect_hnd);
if (NT_STATUS_IS_ERR(nt_status)) {
diff --git a/source3/winbindd/winbindd_msrpc.c 
b/source3/winbindd/winbindd_msrpc.c
index f01308c..13a5d64 100644
--- a/source3/winbindd/winbindd_msrpc.c
+++ b/source3/winbindd/winbindd_msrpc.c
@@ -987,7 +987,7 @@ static NTSTATUS msrpc_lockout_policy(struct winbindd_domain 
*domain,
 
status = dcerpc_samr_QueryDomainInfo(b, mem_ctx,
 &dom_pol,
-12,
+DomainLockoutInformation,
 &info,
 &result);
if (!NT_STATUS_IS_OK(status)) {
@@ -1037,7 +1037,7 @@ static NTSTATUS msrpc_password_policy(struct 
winbindd_domain *domain,
 
status = dcerpc_samr_QueryDomainInfo(b, mem_ctx,
 &dom_pol,
-1,
+DomainPasswordInformation,
 &info,
 &result);
if (!NT_STATUS_IS_OK(status)) {


-- 
Samba Shared Repository


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

2011-04-01 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  bf65a3a s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT
   via  02ae791 s3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT 
(cherry picked from commit d9b03cb4f0906bc7844c4abffcb3c9d8b04dc5eb)
  from  7b3ff54 s3-ctdb_wrap: remove unused variable from 
db_ctdb_fetch_persistent().

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


- Log -
commit bf65a3a582a740c187b668068cb1d5cba3573a08
Author: Volker Lendecke 
Date:   Fri Apr 1 08:40:38 2011 +0200

s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT

Autobuild-User: Volker Lendecke 
Autobuild-Date: Fri Apr  1 09:35:19 CEST 2011 on sn-devel-104
(cherry picked from commit 1272758f8f989647802ea90722661ab133efa83f)

commit 02ae7915ee3bbba8291588ce9ebced396c93a5c0
Author: Volker Lendecke 
Date:   Fri Apr 1 08:40:38 2011 +0200

s3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT
(cherry picked from commit d9b03cb4f0906bc7844c4abffcb3c9d8b04dc5eb)

---

Summary of changes:
 source3/utils/ntlm_auth.c |2 +-
 source3/winbindd/winbindd_cache.c |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index a6c5be8..73f41a7 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -772,7 +772,7 @@ static NTSTATUS do_ccache_ntlm_auth(DATA_BLOB initial_msg, 
DATA_BLOB challenge_m
 */
ctrl = get_pam_winbind_config();
 
-   if (ctrl | WINBIND_KRB5_AUTH) {
+   if (ctrl & WINBIND_KRB5_AUTH) {
wb_request.flags |= WBFLAG_PAM_CONTACT_TRUSTDOM;
}
 
diff --git a/source3/winbindd/winbindd_cache.c 
b/source3/winbindd/winbindd_cache.c
index 243c46a..0a59b8c 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -244,7 +244,7 @@ static uint16 centry_uint16(struct cache_entry *centry)
if (!centry_check_bytes(centry, 2)) {
smb_panic_fn("centry_uint16");
}
-   ret = CVAL(centry->data, centry->ofs);
+   ret = SVAL(centry->data, centry->ofs);
centry->ofs += 2;
return ret;
 }
@@ -790,7 +790,7 @@ static void centry_put_uint32(struct cache_entry *centry, 
uint32 v)
 static void centry_put_uint16(struct cache_entry *centry, uint16 v)
 {
centry_expand(centry, 2);
-   SIVAL(centry->data, centry->ofs, v);
+   SSVAL(centry->data, centry->ofs, v);
centry->ofs += 2;
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-04-01 Thread Volker Lendecke
The branch, master has been updated
   via  1272758 s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT
   via  d9b03cb s3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT
  from  644222a debug: Restore the s3-style check in check_log_size()

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


- Log -
commit 1272758f8f989647802ea90722661ab133efa83f
Author: Volker Lendecke 
Date:   Fri Apr 1 08:40:38 2011 +0200

s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT

Autobuild-User: Volker Lendecke 
Autobuild-Date: Fri Apr  1 09:35:19 CEST 2011 on sn-devel-104

commit d9b03cb4f0906bc7844c4abffcb3c9d8b04dc5eb
Author: Volker Lendecke 
Date:   Fri Apr 1 08:40:38 2011 +0200

s3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT

---

Summary of changes:
 source3/utils/ntlm_auth.c |2 +-
 source3/winbindd/winbindd_cache.c |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index a6c5be8..73f41a7 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -772,7 +772,7 @@ static NTSTATUS do_ccache_ntlm_auth(DATA_BLOB initial_msg, 
DATA_BLOB challenge_m
 */
ctrl = get_pam_winbind_config();
 
-   if (ctrl | WINBIND_KRB5_AUTH) {
+   if (ctrl & WINBIND_KRB5_AUTH) {
wb_request.flags |= WBFLAG_PAM_CONTACT_TRUSTDOM;
}
 
diff --git a/source3/winbindd/winbindd_cache.c 
b/source3/winbindd/winbindd_cache.c
index 57a93a7..68a8625 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -246,7 +246,7 @@ static uint16 centry_uint16(struct cache_entry *centry)
if (!centry_check_bytes(centry, 2)) {
smb_panic_fn("centry_uint16");
}
-   ret = CVAL(centry->data, centry->ofs);
+   ret = SVAL(centry->data, centry->ofs);
centry->ofs += 2;
return ret;
 }
@@ -792,7 +792,7 @@ static void centry_put_uint32(struct cache_entry *centry, 
uint32 v)
 static void centry_put_uint16(struct cache_entry *centry, uint16 v)
 {
centry_expand(centry, 2);
-   SIVAL(centry->data, centry->ofs, v);
+   SSVAL(centry->data, centry->ofs, v);
centry->ofs += 2;
 }
 


-- 
Samba Shared Repository