[PATCHES] clean my_sam_name() after the move

Michael Adam obnox at samba.org
Mon Jan 25 10:08:13 UTC 2016


Only cosmetic changes.

Review appreciated.

Thanks - Michael
-------------- next part --------------
From 3b9126ceef179ffee29d9cdcd29c6cba67e95204 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 21 Jan 2016 12:44:19 +0100
Subject: [PATCH 1/3] s3:lib: fix white spaces in my_sam_name()

Clean-up after function has been moved.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source3/lib/util_names.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/source3/lib/util_names.c b/source3/lib/util_names.c
index 802df5d..fe05b60 100644
--- a/source3/lib/util_names.c
+++ b/source3/lib/util_names.c
@@ -177,15 +177,15 @@ const char *get_global_sam_name(void)
  testing authentication.
 
  LEGACY: this function provides the legacy domain mapping used with
-	 the lp_map_untrusted_to_domain() parameter
+         the lp_map_untrusted_to_domain() parameter
 ******************************************************************/
 
 const char *my_sam_name(void)
 {
-       /* Standalone servers can only use the local netbios name */
-       if ( lp_server_role() == ROLE_STANDALONE )
-               return lp_netbios_name();
+	/* Standalone servers can only use the local netbios name */
+	if (lp_server_role() == ROLE_STANDALONE)
+		return lp_netbios_name();
 
-       /* Default to the DOMAIN name when not specified */
-       return lp_workgroup();
+	/* Default to the DOMAIN name when not specified */
+	return lp_workgroup();
 }
-- 
2.5.0


From 30875ba3418cf422b784e6bd6ea4acbf41aaed82 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 21 Jan 2016 12:45:42 +0100
Subject: [PATCH 2/3] s3:lib: remove supefluous comments from map_my_name()

cleanup after moving

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

diff --git a/source3/lib/util_names.c b/source3/lib/util_names.c
index fe05b60..a2c3b1f 100644
--- a/source3/lib/util_names.c
+++ b/source3/lib/util_names.c
@@ -175,17 +175,12 @@ const char *get_global_sam_name(void)
 /******************************************************************
  Get the default domain/netbios name to be used when
  testing authentication.
-
- LEGACY: this function provides the legacy domain mapping used with
-         the lp_map_untrusted_to_domain() parameter
 ******************************************************************/
 
 const char *my_sam_name(void)
 {
-	/* Standalone servers can only use the local netbios name */
 	if (lp_server_role() == ROLE_STANDALONE)
 		return lp_netbios_name();
 
-	/* Default to the DOMAIN name when not specified */
 	return lp_workgroup();
 }
-- 
2.5.0


From b43c3ad91bbb8290e49d78b1c6a801865eb2c9b1 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 21 Jan 2016 12:46:40 +0100
Subject: [PATCH 3/3] s3:lib: add braces around if-block in my_sam_name()

Clean-up after moving the function.

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

diff --git a/source3/lib/util_names.c b/source3/lib/util_names.c
index a2c3b1f..dc5c530 100644
--- a/source3/lib/util_names.c
+++ b/source3/lib/util_names.c
@@ -179,8 +179,9 @@ const char *get_global_sam_name(void)
 
 const char *my_sam_name(void)
 {
-	if (lp_server_role() == ROLE_STANDALONE)
+	if (lp_server_role() == ROLE_STANDALONE) {
 		return lp_netbios_name();
+	}
 
 	return lp_workgroup();
 }
-- 
2.5.0

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


More information about the samba-technical mailing list