X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=src%2Fpatches%2Fsamba%2Fsamba-3.6.99-fix_security_server_share_access.patch;fp=src%2Fpatches%2Fsamba%2Fsamba-3.6.99-fix_security_server_share_access.patch;h=0000000000000000000000000000000000000000;hp=ad2335328f9660fb5925d25f88ded22c42248e7a;hb=201ad7ff80eb8870aab2b903be6eb7aea2adf563;hpb=f29f169735ff3b431c6dc7cb50b36d0fe644163b diff --git a/src/patches/samba/samba-3.6.99-fix_security_server_share_access.patch b/src/patches/samba/samba-3.6.99-fix_security_server_share_access.patch deleted file mode 100644 index ad2335328f..0000000000 --- a/src/patches/samba/samba-3.6.99-fix_security_server_share_access.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 56bfca66b8597afe731f4624bb9f862bb45f81ba Mon Sep 17 00:00:00 2001 -From: Matt Rogers -Date: Mon, 12 Oct 2015 14:46:18 +0200 -Subject: [PATCH] PATCHSET33: s3-auch: Fix secuirty = server share access - -Resolve user groups in non-winbind path of passwd_to_SamInfo3(), fixing -group memberships with server security. - -Signed-off-by: Matt Rogers ---- - source3/auth/server_info.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c -index 1fd9317..91724cc 100644 ---- a/source3/auth/server_info.c -+++ b/source3/auth/server_info.c -@@ -571,7 +571,9 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx, - enum lsa_SidType type; - uint32_t num_sids = 0; - struct dom_sid *user_sids = NULL; -+ gid_t *gids = NULL; - bool ok; -+ int i; - - tmp_ctx = talloc_stackframe(); - -@@ -629,6 +631,29 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx, - get_global_sam_sid(), - DOMAIN_RID_USERS); - } -+ -+ if (!getgroups_unix_user(tmp_ctx, -+ unix_username, -+ pwd->pw_gid, -+ &gids, -+ &num_sids)) { -+ DEBUG(1, ("Failed to get unix user groups.\n")); -+ goto done; -+ } -+ -+ if (num_sids == 0) { -+ smb_panic("primary group missing"); -+ } -+ -+ user_sids = TALLOC_ARRAY(tmp_ctx, struct dom_sid, num_sids); -+ -+ if (user_sids == NULL) { -+ return NT_STATUS_NO_MEMORY; -+ } -+ -+ for (i = 0; i < num_sids; i++) { -+ gid_to_sid(&user_sids[i], gids[i]); -+ } - } - - /* Make sure we have a valid group sid */ -@@ -696,6 +721,9 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx, - - status = NT_STATUS_OK; - done: -+ if (gids != NULL) { -+ talloc_free(gids); -+ } - talloc_free(tmp_ctx); - - return status; --- -2.5.0 -