[SCM] Samba Shared Repository - branch master updated

2015-08-14 Thread Martin Schwenke
The branch, master has been updated
   via  a431828 python:samba/upgrade.py Fix format string syntax in error 
condition
   via  5d141a3 lib: Remove some unused code
   via  f0f23d6 lib: Remove some unused code
   via  f85c2a6 smbd: Use a struct initializer
   via  ba116fa smbd: Remove a confusing comment
  from  b5ce90e nfs4acls: Remove type_name param from smbacl4_get_vfs_params

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


- Log -
commit a431828460a8b069589662ad87e47c61c020eb9c
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Aug 14 16:43:41 2015 +1200

python:samba/upgrade.py Fix format string syntax in error condition

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11436
Signed-off-by: Andrew Bartlett abart...@samba.org
Reviewed-by: Martin Schwenke mar...@meltin.net

Autobuild-User(master): Martin Schwenke mart...@samba.org
Autobuild-Date(master): Fri Aug 14 10:52:39 CEST 2015 on sn-devel-104

commit 5d141a32f34de1773c18f2f7752f495eb933940c
Author: Volker Lendecke v...@samba.org
Date:   Wed Aug 12 09:18:28 2015 +0200

lib: Remove some unused code

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Martin Schwenke mar...@meltin.net

commit f0f23d6a927cf3fdde9cc2a3e89ccd4dbd89e9f3
Author: Volker Lendecke v...@samba.org
Date:   Wed Aug 12 09:14:35 2015 +0200

lib: Remove some unused code

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Martin Schwenke mar...@meltin.net

commit f85c2a6852ad880c4df4882316ec0f6e13e87dad
Author: Volker Lendecke v...@samba.org
Date:   Wed Aug 12 08:58:31 2015 +0200

smbd: Use a struct initializer

Saves a few bytes of .text

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Martin Schwenke mar...@meltin.net

commit ba116fa7cdcbc2ecd29d4af1a88a50a0ea6c15a8
Author: Volker Lendecke v...@samba.org
Date:   Wed Aug 12 08:55:56 2015 +0200

smbd: Remove a confusing comment

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Martin Schwenke mar...@meltin.net

---

Summary of changes:
 libcli/security/secace.c  | 19 ---
 libcli/security/secace.h  |  1 -
 libcli/security/secdesc.c | 19 ---
 libcli/security/secdesc.h |  5 -
 python/samba/upgrade.py   |  2 +-
 source3/smbd/posix_acls.c | 18 +-
 6 files changed, 10 insertions(+), 54 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/secace.c b/libcli/security/secace.c
index b7c9fc54..26c366a 100644
--- a/libcli/security/secace.c
+++ b/libcli/security/secace.c
@@ -69,25 +69,6 @@ void init_sec_ace(struct security_ace *t, const struct 
dom_sid *sid, enum securi
t-trustee = *sid;
 }
 
-/***
-  modify SID's permissions at ACL 
-/
-
-NTSTATUS sec_ace_mod_sid(struct security_ace *ace, size_t num, const struct 
dom_sid *sid, uint32_t mask)
-{
-   unsigned int i = 0;
-
-   if (!ace || !sid)  return NT_STATUS_INVALID_PARAMETER;
-
-   for (i = 0; i  num; i ++) {
-   if (dom_sid_equal(ace[i].trustee, sid)) {
-   ace[i].access_mask = mask;
-   return NT_STATUS_OK;
-   }
-   }
-   return NT_STATUS_NOT_FOUND;
-}
-
 int nt_ace_inherit_comp(const struct security_ace *a1, const struct 
security_ace *a2)
 {
int a1_inh = a1-flags  SEC_ACE_FLAG_INHERITED_ACE;
diff --git a/libcli/security/secace.h b/libcli/security/secace.h
index 5416134..16c495d 100644
--- a/libcli/security/secace.h
+++ b/libcli/security/secace.h
@@ -27,7 +27,6 @@ bool sec_ace_object(uint8_t type);
 void sec_ace_copy(struct security_ace *ace_dest, const struct security_ace 
*ace_src);
 void init_sec_ace(struct security_ace *t, const struct dom_sid *sid, enum 
security_ace_type type,
  uint32_t mask, uint8_t flag);
-NTSTATUS sec_ace_mod_sid(struct security_ace *ace, size_t num, const struct 
dom_sid *sid, uint32_t mask);
 int nt_ace_inherit_comp( const struct security_ace *a1, const struct 
security_ace *a2);
 int nt_ace_canon_comp( const struct security_ace *a1, const struct 
security_ace *a2);
 void dacl_sort_into_canonical_order(struct security_ace *srclist, unsigned int 
num_aces);
diff --git a/libcli/security/secdesc.c b/libcli/security/secdesc.c
index 46b820e..bbad8a3 100644
--- a/libcli/security/secdesc.c
+++ b/libcli/security/secdesc.c
@@ -396,25 +396,6 @@ struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, 
struct sec_desc_buf *src)
return make_sec_desc_buf( ctx, src-sd_size, src-sd);
 }
 
-/***
- Modify a SID's permissions in a struct security_descriptor.

[SCM] Samba Shared Repository - branch master updated

2015-08-14 Thread Andrew Bartlett
The branch, master has been updated
   via  c93e2cd waf: Check for Linux has 32-bit credential calls
  from  e6c8452 libcli: Use iov_buflen in smb2_signing.c

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


- Log -
commit c93e2cdd1ef9f9e32e018c81b58f891cc95c0398
Author: Andreas Schneider a...@samba.org
Date:   Fri Aug 14 10:59:05 2015 +0200

waf: Check for Linux has 32-bit credential calls

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Andrew Bartlett abart...@samba.org

Autobuild-User(master): Andrew Bartlett abart...@samba.org
Autobuild-Date(master): Fri Aug 14 18:04:53 CEST 2015 on sn-devel-104

---

Summary of changes:
 lib/uid_wrapper/wscript | 38 +-
 1 file changed, 37 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/lib/uid_wrapper/wscript b/lib/uid_wrapper/wscript
index 3b3d5bf..b5b1f7a 100644
--- a/lib/uid_wrapper/wscript
+++ b/lib/uid_wrapper/wscript
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 import Options
-import os
+import os, sys
 
 VERSION=1.1.0
 
@@ -107,6 +107,42 @@ def configure(conf):
'int syscall(int number, ...)',
define='HAVE_SYSCALL_INT', headers='unistd.h 
sys/syscall.h')
 
+if (sys.platform.rfind('linux')  -1):
+conf.CHECK_CODE('''
+#if defined(HAVE_UNISTD_H)
+#include unistd.h
+#endif
+#include stdlib.h
+#include stdio.h
+#include sys/types.h
+#include errno.h
+
+#ifdef HAVE_SYS_PRIV_H
+#include sys/priv.h
+#endif
+#ifdef HAVE_SYS_ID_H
+#include sys/id.h
+#endif
+
+#if defined(HAVE_SYSCALL_H)
+#include syscall.h
+#endif
+
+#if defined(HAVE_SYS_SYSCALL_H)
+#include sys/syscall.h
+#endif
+
+syscall(SYS_setresuid32, -1, -1, -1);
+syscall(SYS_setresgid32, -1, -1, -1);
+syscall(SYS_setreuid32, -1, -1);
+syscall(SYS_setregid32, -1, -1);
+syscall(SYS_setuid32, -1);
+syscall(SYS_setgid32, -1);
+syscall(SYS_setgroups32, 0, NULL);
+''',
+'HAVE_LINUX_32BIT_SYSCALLS',
+msg=Checking whether Linux has 32-bit credential calls);
+
 conf.CHECK_FUNCS('getresuid getresgid')
 
 # Create full path to uid_wrapper


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-08-14 Thread Michael Adam
The branch, master has been updated
   via  e6c8452 libcli: Use iov_buflen in smb2_signing.c
  from  a431828 python:samba/upgrade.py Fix format string syntax in error 
condition

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


- Log -
commit e6c8452093cd169958668543872fd4bc13755240
Author: Volker Lendecke v...@samba.org
Date:   Mon Aug 10 12:02:34 2015 +0200

libcli: Use iov_buflen in smb2_signing.c

This gives us overflow protection.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

Autobuild-User(master): Michael Adam ob...@samba.org
Autobuild-Date(master): Fri Aug 14 13:56:49 CEST 2015 on sn-devel-104

---

Summary of changes:
 libcli/smb/smb2_signing.c | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/smb/smb2_signing.c b/libcli/smb/smb2_signing.c
index 489e18b..b723554 100644
--- a/libcli/smb/smb2_signing.c
+++ b/libcli/smb/smb2_signing.c
@@ -22,6 +22,7 @@
 #include system/filesys.h
 #include ../libcli/smb/smb_common.h
 #include ../lib/crypto/crypto.h
+#include lib/util/iov_buf.h
 
 NTSTATUS smb2_signing_sign_pdu(DATA_BLOB signing_key,
   enum protocol_types protocol,
@@ -217,7 +218,7 @@ NTSTATUS smb2_signing_encrypt_pdu(DATA_BLOB encryption_key,
uint8_t sig[16];
int i;
size_t a_total;
-   size_t m_total = 0;
+   ssize_t m_total;
union {
struct aes_ccm_128_context ccm;
struct aes_gcm_128_context gcm;
@@ -241,8 +242,10 @@ NTSTATUS smb2_signing_encrypt_pdu(DATA_BLOB encryption_key,
}
 
a_total = SMB2_TF_HDR_SIZE - SMB2_TF_NONCE;
-   for (i=1; i  count; i++) {
-   m_total += vector[i].iov_len;
+
+   m_total = iov_buflen(vector[1], count-1);
+   if (m_total == -1) {
+   return NT_STATUS_BUFFER_TOO_SMALL;
}
 
SSVAL(tf, SMB2_TF_FLAGS, SMB2_TF_FLAGS_ENCRYPTED);
@@ -311,7 +314,7 @@ NTSTATUS smb2_signing_decrypt_pdu(DATA_BLOB decryption_key,
uint8_t sig[16];
int i;
size_t a_total;
-   size_t m_total = 0;
+   ssize_t m_total;
uint32_t msg_size = 0;
union {
struct aes_ccm_128_context ccm;
@@ -336,8 +339,10 @@ NTSTATUS smb2_signing_decrypt_pdu(DATA_BLOB decryption_key,
}
 
a_total = SMB2_TF_HDR_SIZE - SMB2_TF_NONCE;
-   for (i=1; i  count; i++) {
-   m_total += vector[i].iov_len;
+
+   m_total = iov_buflen(vector[1], count-1);
+   if (m_total == -1) {
+   return NT_STATUS_BUFFER_TOO_SMALL;
}
 
flags = SVAL(tf, SMB2_TF_FLAGS);


-- 
Samba Shared Repository