summaryrefslogtreecommitdiff
path: root/source3/sam
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-27 01:03:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:18:59 -0500
commitad6f4f14ad10dab330e51ad36f8f8d6ccc065be2 (patch)
tree32bbde542a0a52950948f49e961a163b81c2e9b1 /source3/sam
parent7d187fe7e098c16077d655978a5ee06d5695ea41 (diff)
downloadsamba-ad6f4f14ad10dab330e51ad36f8f8d6ccc065be2.tar.gz
samba-ad6f4f14ad10dab330e51ad36f8f8d6ccc065be2.tar.bz2
samba-ad6f4f14ad10dab330e51ad36f8f8d6ccc065be2.zip
r16548: Fix bug #3867 reported by jason@ncac.gwu.edu.
Jeremy. (This used to be commit 2b8d72f09c6d79d5d41421545b538da573adcd9d)
Diffstat (limited to 'source3/sam')
-rw-r--r--source3/sam/nss_info.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/source3/sam/nss_info.c b/source3/sam/nss_info.c
index 3d0e658a35..6d01916754 100644
--- a/source3/sam/nss_info.c
+++ b/source3/sam/nss_info.c
@@ -22,6 +22,20 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
+static enum wb_posix_mapping wb_posix_map_type(const char *map_str)
+{
+ if (strequal(map_str, "template"))
+ return WB_POSIX_MAP_TEMPLATE;
+ else if (strequal(map_str, "sfu"))
+ return WB_POSIX_MAP_SFU;
+ else if (strequal(map_str, "rfc2307"))
+ return WB_POSIX_MAP_RFC2307;
+ else if (strequal(map_str, "unixinfo"))
+ return WB_POSIX_MAP_UNIXINFO;
+
+ return WB_POSIX_MAP_UNKNOWN;
+}
+
/* winbind nss info = rfc2307 SO36:sfu FHAIN:rfc2307 PANKOW:template
*
* syntax is:
@@ -43,7 +57,7 @@ enum wb_posix_mapping get_nss_info(const char *domain_name)
return WB_POSIX_MAP_TEMPLATE;
}
- if ((map_templ = wb_posix_map_type(list[0])) == -1) {
+ if ((map_templ = wb_posix_map_type(list[0])) == WB_POSIX_MAP_UNKNOWN) {
DEBUG(0,("get_nss_info: invalid setting: %s\n", list[0]));
return WB_POSIX_MAP_TEMPLATE;
}
@@ -64,7 +78,7 @@ enum wb_posix_mapping get_nss_info(const char *domain_name)
enum wb_posix_mapping type;
- if ((type = wb_posix_map_type(p)) == -1) {
+ if ((type = wb_posix_map_type(p)) == WB_POSIX_MAP_UNKNOWN) {
DEBUG(0,("get_nss_info: invalid setting: %s\n", p));
/* return WB_POSIX_MAP_TEMPLATE; */
continue;
@@ -95,17 +109,3 @@ const char *wb_posix_map_str(enum wb_posix_mapping mtype)
}
return NULL;
}
-
-enum wb_posix_mapping wb_posix_map_type(const char *map_str)
-{
- if (strequal(map_str, "template"))
- return WB_POSIX_MAP_TEMPLATE;
- else if (strequal(map_str, "sfu"))
- return WB_POSIX_MAP_SFU;
- else if (strequal(map_str, "rfc2307"))
- return WB_POSIX_MAP_RFC2307;
- else if (strequal(map_str, "unixinfo"))
- return WB_POSIX_MAP_UNIXINFO;
-
- return -1;
-}