summaryrefslogtreecommitdiffstats
path: root/source/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-04 02:58:22 +0000
committerJeremy Allison <jra@samba.org>2001-12-04 02:58:22 +0000
commit8d41dfd149625e8ac53ab5e90a96e9a2daf9a629 (patch)
tree613f50bbe98d1ffef9678c1b8796e482ac5c322b /source/smbd
parent9f5d7e8a04c36395570247bc5e1b7b3fc5d1a322 (diff)
downloadsamba-8d41dfd149625e8ac53ab5e90a96e9a2daf9a629.tar.gz
samba-8d41dfd149625e8ac53ab5e90a96e9a2daf9a629.tar.xz
samba-8d41dfd149625e8ac53ab5e90a96e9a2daf9a629.zip
Tidyup of lib/username. Add name_is_local fn to determine if name is
winbindd. Getting ready for efficiency fix in group lookups. Jeremy.
Diffstat (limited to 'source/smbd')
-rw-r--r--source/smbd/uid.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/smbd/uid.c b/source/smbd/uid.c
index 524ddb15ab2..9a9de0a796e 100644
--- a/source/smbd/uid.c
+++ b/source/smbd/uid.c
@@ -437,6 +437,16 @@ void add_supplementary_nt_login_groups(int *n_groups, gid_t **pp_groups, NT_USER
}
/*****************************************************************
+ Check if a user or group name is local (this is a *local* name for
+ *local* people, there's nothing for you here...).
+*****************************************************************/
+
+BOOL name_is_local(const char *name)
+{
+ return !strchr_m(name, *lp_winbind_separator());
+}
+
+/*****************************************************************
*THE CANONICAL* convert name to SID function.
Tries winbind first - then uses local lookup.
*****************************************************************/