[SCM] Samba Shared Repository - branch master updated
Martin Schwenke
martins at samba.org
Fri Aug 14 08:53:02 UTC 2015
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 <abartlet at 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 <abartlet at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Fri Aug 14 10:52:39 CEST 2015 on sn-devel-104
commit 5d141a32f34de1773c18f2f7752f495eb933940c
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 12 09:18:28 2015 +0200
lib: Remove some unused code
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit f0f23d6a927cf3fdde9cc2a3e89ccd4dbd89e9f3
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 12 09:14:35 2015 +0200
lib: Remove some unused code
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit f85c2a6852ad880c4df4882316ec0f6e13e87dad
Author: Volker Lendecke <vl at 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 <vl at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit ba116fa7cdcbc2ecd29d4af1a88a50a0ea6c15a8
Author: Volker Lendecke <vl at samba.org>
Date: Wed Aug 12 08:55:56 2015 +0200
smbd: Remove a confusing comment
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Martin Schwenke <martin at 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.
-********************************************************************/
-
-NTSTATUS sec_desc_mod_sid(struct security_descriptor *sd, struct dom_sid *sid, uint32_t mask)
-{
- NTSTATUS status;
-
- if (!sd || !sid)
- return NT_STATUS_INVALID_PARAMETER;
-
- status = sec_ace_mod_sid(sd->dacl->aces, sd->dacl->num_aces, sid, mask);
-
- if (!NT_STATUS_IS_OK(status))
- return status;
-
- return NT_STATUS_OK;
-}
-
/*
* Determine if an struct security_ace is inheritable
*/
diff --git a/libcli/security/secdesc.h b/libcli/security/secdesc.h
index 4c96ccd..34d9d77 100644
--- a/libcli/security/secdesc.h
+++ b/libcli/security/secdesc.h
@@ -89,11 +89,6 @@ struct sec_desc_buf *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, struct secur
********************************************************************/
struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, struct sec_desc_buf *src);
-/*******************************************************************
- Modify a SID's permissions in a struct security_descriptor.
-********************************************************************/
-NTSTATUS sec_desc_mod_sid(struct security_descriptor *sd, struct dom_sid *sid, uint32_t mask);
-
bool sd_has_inheritable_components(const struct security_descriptor *parent_ctr, bool container);
NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
struct security_descriptor **ppsd,
diff --git a/python/samba/upgrade.py b/python/samba/upgrade.py
index 94b7732..215ccd3 100644
--- a/python/samba/upgrade.py
+++ b/python/samba/upgrade.py
@@ -407,7 +407,7 @@ def get_posix_attr_from_ldap_backend(logger, ldb_object, base_dn, user, attr):
expression=("(&(objectClass=posixAccount)(uid=%s))"
% (user)), attrs=[attr])
except ldb.LdbError, e:
- raise ProvisioningError("Failed to retrieve attribute %s for user %s, the error is: %s", attr, user, e)
+ raise ProvisioningError("Failed to retrieve attribute %s for user %s, the error is: %s" % (attr, user, e))
else:
if msg.count <= 1:
# This will raise KeyError (which is what we want) if there isn't a entry for this user
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index b69e5b4..5e39370 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2624,7 +2624,6 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
entry_id = SMB_ACL_NEXT_ENTRY;
- /* Is this a MASK entry ? */
if (sys_acl_get_tag_type(entry, &tagtype) == -1)
continue;
@@ -2695,14 +2694,15 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
if ((ace = talloc(talloc_tos(), canon_ace)) == NULL)
goto fail;
- ZERO_STRUCTP(ace);
- ace->type = tagtype;
- ace->perms = convert_permset_to_mode_t(permset);
- ace->attr = ALLOW_ACE;
- ace->trustee = sid;
- ace->unix_ug = unix_ug;
- ace->owner_type = owner_type;
- ace->ace_flags = get_pai_flags(pal, ace, is_default_acl);
+ *ace = (canon_ace) {
+ .type = tagtype,
+ .perms = convert_permset_to_mode_t(permset),
+ .attr = ALLOW_ACE,
+ .trustee = sid,
+ .unix_ug = unix_ug,
+ .owner_type = owner_type,
+ .ace_flags = get_pai_flags(pal, ace, is_default_acl)
+ };
DLIST_ADD(l_head, ace);
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list