[PATCH]smbcacls: fix uninitialized variable

Uri Simchoni uri at samba.org
Wed Jan 20 07:41:17 UTC 2016


Hi,

Attached is a fix for https://bugzilla.samba.org/show_bug.cgi?id=11682

Review appreciated.
Thanks,
Uri.
-------------- next part --------------
From 72fece48a5d92952b241d518acfbd8955982278b Mon Sep 17 00:00:00 2001
From: Uri Simchoni <uri at samba.org>
Date: Wed, 20 Jan 2016 09:34:26 +0200
Subject: [PATCH] smbcacls: fix uninitialized variable

An uninitialized variable causes "numeric" mode to be
used without the -n option.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11682

Signed-off-by: Uri Simchoni <uri at samba.org>
---
 source3/utils/smbcacls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 2596069..d50219c 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -791,7 +791,7 @@ int main(int argc, char *argv[])
 	poptContext pc;
 	/* numeric is set when the user wants numeric SIDs and ACEs rather
 	   than going via LSA calls to resolve them */
-	int numeric;
+	int numeric = 0;
 
 	struct poptOption long_options[] = {
 		POPT_AUTOHELP
-- 
2.4.3



More information about the samba-technical mailing list