diff options
author | Günther Deschner <gd@samba.org> | 2011-03-30 15:09:10 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-03-30 15:14:55 +0200 |
commit | 33082d016ee27537af0514d5eebcdaf0360fa4f7 (patch) | |
tree | 169db458b46fd911d53ffa5552e9a47b7196166f | |
parent | 3253d5ad0515198083b0b185c06b659fc6972830 (diff) | |
download | samba-33082d016ee27537af0514d5eebcdaf0360fa4f7.tar.gz samba-33082d016ee27537af0514d5eebcdaf0360fa4f7.tar.bz2 samba-33082d016ee27537af0514d5eebcdaf0360fa4f7.zip |
s3-passdb: move LOOKUP_NAME_ flags to passdb where they belong to.
Guenther
-rw-r--r-- | source3/include/smb.h | 21 | ||||
-rw-r--r-- | source3/passdb/lookup_sid.h | 48 | ||||
-rw-r--r-- | source3/winbindd/winbindd_getgroups.c | 1 | ||||
-rw-r--r-- | source3/winbindd/winbindd_getpwnam.c | 1 |
4 files changed, 50 insertions, 21 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 9427435483..96e2b0034b 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -153,27 +153,6 @@ typedef union unid_t { #define SID_MAX_SIZE ((size_t)(8+(MAXSUBAUTHS*4))) -#define LOOKUP_NAME_NONE 0x00000000 -#define LOOKUP_NAME_ISOLATED 0x00000001 /* Look up unqualified names */ -#define LOOKUP_NAME_REMOTE 0x00000002 /* Ask others */ -#define LOOKUP_NAME_GROUP 0x00000004 /* (unused) This is a NASTY hack for - valid users = @foo where foo also - exists in as user. */ -#define LOOKUP_NAME_NO_NSS 0x00000008 /* no NSS calls to avoid - winbind recursions */ -#define LOOKUP_NAME_BUILTIN 0x00000010 /* builtin names */ -#define LOOKUP_NAME_WKN 0x00000020 /* well known names */ -#define LOOKUP_NAME_DOMAIN 0x00000040 /* only lookup own domain */ -#define LOOKUP_NAME_LOCAL (LOOKUP_NAME_ISOLATED\ - |LOOKUP_NAME_BUILTIN\ - |LOOKUP_NAME_WKN\ - |LOOKUP_NAME_DOMAIN) -#define LOOKUP_NAME_ALL (LOOKUP_NAME_ISOLATED\ - |LOOKUP_NAME_REMOTE\ - |LOOKUP_NAME_BUILTIN\ - |LOOKUP_NAME_WKN\ - |LOOKUP_NAME_DOMAIN) - #include "librpc/gen_ndr/dcerpc.h" #include "librpc/gen_ndr/security.h" diff --git a/source3/passdb/lookup_sid.h b/source3/passdb/lookup_sid.h index 81303f87cb..3c3d278c2a 100644 --- a/source3/passdb/lookup_sid.h +++ b/source3/passdb/lookup_sid.h @@ -1,5 +1,51 @@ +/* + Unix SMB/CIFS implementation. + uid/user handling + Copyright (C) Andrew Tridgell 1992-1998 + Copyright (C) Gerald (Jerry) Carter 2003 + Copyright (C) Volker Lendecke 2005 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#ifndef _PASSDB_LOOKUP_SID_H_ +#define _PASSDB_LOOKUP_SID_H_ + #include "../librpc/gen_ndr/lsa.h" +#define LOOKUP_NAME_NONE 0x00000000 +#define LOOKUP_NAME_ISOLATED 0x00000001 /* Look up unqualified names */ +#define LOOKUP_NAME_REMOTE 0x00000002 /* Ask others */ +#define LOOKUP_NAME_GROUP 0x00000004 /* (unused) This is a NASTY hack for + valid users = @foo where foo also + exists in as user. */ +#define LOOKUP_NAME_NO_NSS 0x00000008 /* no NSS calls to avoid + winbind recursions */ +#define LOOKUP_NAME_BUILTIN 0x00000010 /* builtin names */ +#define LOOKUP_NAME_WKN 0x00000020 /* well known names */ +#define LOOKUP_NAME_DOMAIN 0x00000040 /* only lookup own domain */ +#define LOOKUP_NAME_LOCAL (LOOKUP_NAME_ISOLATED\ + |LOOKUP_NAME_BUILTIN\ + |LOOKUP_NAME_WKN\ + |LOOKUP_NAME_DOMAIN) +#define LOOKUP_NAME_ALL (LOOKUP_NAME_ISOLATED\ + |LOOKUP_NAME_REMOTE\ + |LOOKUP_NAME_BUILTIN\ + |LOOKUP_NAME_WKN\ + |LOOKUP_NAME_DOMAIN) + struct lsa_dom_info { bool valid; struct dom_sid sid; @@ -47,3 +93,5 @@ bool delete_gid_cache(gid_t gid); bool delete_sid_cache(const struct dom_sid* psid); void flush_uid_cache(void); void flush_gid_cache(void); + +#endif /* _PASSDB_LOOKUP_SID_H_ */ diff --git a/source3/winbindd/winbindd_getgroups.c b/source3/winbindd/winbindd_getgroups.c index 736eba698a..c9b0f195ce 100644 --- a/source3/winbindd/winbindd_getgroups.c +++ b/source3/winbindd/winbindd_getgroups.c @@ -19,6 +19,7 @@ #include "includes.h" #include "winbindd.h" +#include "passdb/lookup_sid.h" /* only for LOOKUP_NAME_NO_NSS flag */ struct winbindd_getgroups_state { struct tevent_context *ev; diff --git a/source3/winbindd/winbindd_getpwnam.c b/source3/winbindd/winbindd_getpwnam.c index 77e827e241..bc771b2e41 100644 --- a/source3/winbindd/winbindd_getpwnam.c +++ b/source3/winbindd/winbindd_getpwnam.c @@ -19,6 +19,7 @@ #include "includes.h" #include "winbindd.h" +#include "passdb/lookup_sid.h" /* only for LOOKUP_NAME_NO_NSS flag */ struct winbindd_getpwnam_state { struct tevent_context *ev; |