[PATCHES] a few minor comment cleanups

Michael Adam obnox at samba.org
Wed Aug 3 22:18:23 UTC 2016


Remove/fix a few comments that I came across while
debugging an issue with share access.

Review appreciated!

Thanks - Michael
-------------- next part --------------
From 312f69044faec4db1e61690c819f4a83dfa4d0bc Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 4 Aug 2016 00:06:08 +0200
Subject: [PATCH 1/3] passdb: remove a misleading comment from
 lookup_name_smbconf()

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source3/passdb/lookup_sid.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 1ffd657..110bdd3 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -401,7 +401,6 @@ bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
 	char *qualified_name;
 	const char *p;
 
-	/* NB. No winbindd_separator here as lookup_name needs \\' */
 	if ((p = strchr_m(full_name, *lp_winbind_separator())) != NULL) {
 
 		/* The name is already qualified with a domain. */
-- 
2.5.5


From fb4632d5021ee7643e770f31cdac728dc5f092a4 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 4 Aug 2016 00:13:31 +0200
Subject: [PATCH 2/3] smbd: remove redundant comment (with typo) from
 token_contains_name()

The code says it all.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source3/smbd/share_access.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/source3/smbd/share_access.c b/source3/smbd/share_access.c
index fa56063..3cbf7f3 100644
--- a/source3/smbd/share_access.c
+++ b/source3/smbd/share_access.c
@@ -91,8 +91,6 @@ static bool token_contains_name(TALLOC_CTX *mem_ctx,
 		smb_panic("substitutions failed");
 	}
 
-	/* check to see is we already have a SID */
-
 	if ( string_to_sid( &sid, name ) ) {
 		DEBUG(5,("token_contains_name: Checking for SID [%s] in token\n", name));
 		return nt_token_check_sid( &sid, token );
-- 
2.5.5


From d074dd9893f2a091bcf6bf1ac80e4fba71c0da51 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 4 Aug 2016 00:15:13 +0200
Subject: [PATCH 3/3] s3:lib: fix a typo in comment for talloc_sub_basic()

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source3/lib/substitute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index 4e2ce9b..bcfdd29 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -456,7 +456,7 @@ void standard_sub_basic(const char *smb_name, const char *domain_name,
 
 /****************************************************************************
  Do some standard substitutions in a string.
- This function will return an talloced string that has to be freed.
+ This function will return a talloced string that has to be freed.
 ****************************************************************************/
 
 char *talloc_sub_basic(TALLOC_CTX *mem_ctx,
-- 
2.5.5

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160804/1f76f402/signature.sig>


More information about the samba-technical mailing list