summaryrefslogtreecommitdiff
path: root/source3/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
commitc2e3d8ba018221c0a0b22a91fdb361dd740482b9 (patch)
treef8bbfee1502447df7b31bd4d794607caa5aee1ae /source3/smbd
parentbca2bcd87e3054c46651563024d1a91bcdf42d78 (diff)
downloadsamba-c2e3d8ba018221c0a0b22a91fdb361dd740482b9.tar.gz
samba-c2e3d8ba018221c0a0b22a91fdb361dd740482b9.tar.bz2
samba-c2e3d8ba018221c0a0b22a91fdb361dd740482b9.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. (This used to be commit 8d41dfd149625e8ac53ab5e90a96e9a2daf9a629)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/uid.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 524ddb15ab..9a9de0a796 100644
--- a/source3/smbd/uid.c
+++ b/source3/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.
*****************************************************************/