[PATCH] Two small cleanups to libads/
Volker Lendecke
Volker.Lendecke at SerNet.DE
Fri Nov 23 07:42:09 UTC 2018
Hi!
Review appreciated!
Thanks, Volker
--
Besuchen Sie die verinice.XP 2019 in Berlin!
Anwenderkonferenz für Informationssicherheit
26.-28. Februar 2019 - im Hotel Radisson Blu
Info & Anmeldung hier: http://veriniceXP.org
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 72db4e661d07cadeb30d981ec434e68f9fe8c136 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 23 Nov 2018 08:39:02 +0100
Subject: [PATCH 1/2] libads: Use dom_sid_string_buf
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/libads/disp_sec.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/source3/libads/disp_sec.c b/source3/libads/disp_sec.c
index 472741fa1b6..96c29078378 100644
--- a/source3/libads/disp_sec.c
+++ b/source3/libads/disp_sec.c
@@ -22,6 +22,7 @@
#include "libads/ldap_schema.h"
#include "../libcli/security/secace.h"
#include "../librpc/ndr/libndr.h"
+#include "libcli/security/dom_sid.h"
/* for ADS */
#define SEC_RIGHTS_FULL_CTRL 0xf01ff
@@ -139,6 +140,7 @@ static void ads_disp_sec_ace_object(ADS_STRUCT *ads,
static void ads_disp_ace(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct security_ace *sec_ace)
{
const char *access_type = "UNKNOWN";
+ struct dom_sid_buf sidbuf;
if (!sec_ace_object(sec_ace->type)) {
printf("------- ACE (type: 0x%02x, flags: 0x%02x, size: 0x%02x, mask: 0x%x)\n",
@@ -169,8 +171,9 @@ static void ads_disp_ace(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct security_a
access_type = "AUDIT OBJECT";
}
- printf("access SID: %s\naccess type: %s\n",
- sid_string_talloc(mem_ctx, &sec_ace->trustee), access_type);
+ printf("access SID: %s\naccess type: %s\n",
+ dom_sid_str_buf(&sec_ace->trustee, &sidbuf),
+ access_type);
if (sec_ace_object(sec_ace->type)) {
ads_disp_sec_ace_object(ads, mem_ctx, &sec_ace->object.object);
--
2.11.0
From 9f198aab948cfa5871b2de19bfc9cbca300ad898 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 23 Nov 2018 08:40:57 +0100
Subject: [PATCH 2/2] libads: Align integer types
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/libads/disp_sec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source3/libads/disp_sec.c b/source3/libads/disp_sec.c
index 96c29078378..8ec4a32bd7e 100644
--- a/source3/libads/disp_sec.c
+++ b/source3/libads/disp_sec.c
@@ -199,7 +199,7 @@ static void ads_disp_acl(struct security_acl *sec_acl, const char *type)
/* display SD */
void ads_disp_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct security_descriptor *sd)
{
- int i;
+ uint32_t i;
char *tmp_path = NULL;
if (!sd) {
--
2.11.0
More information about the samba-technical
mailing list