allow root as well as domain admins to open an LDAP connection
[Samba.git] / source / include / rpc_creds.h
blob0ab508ffe70edb2f4f964dac3c30d940538721be
1 /*
2 Unix SMB/Netbios implementation.
3 Version 1.9.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-1999
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1999
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _RPC_CREDS_H /* _RPC_CREDS_H */
25 #define _RPC_CREDS_H
27 typedef struct ntuser_creds
29 fstring user_name;
30 fstring domain;
31 struct pwd_info pwd;
33 uint32 ntlmssp_flags;
35 } CREDS_NT;
37 typedef struct unixuser_creds
39 fstring user_name;
40 fstring requested_name;
41 fstring real_name;
42 BOOL guest;
44 } CREDS_UNIX;
46 typedef struct unixsec_creds
48 uint32 uid;
49 uint32 gid;
50 int num_grps;
51 uint32 *grps;
53 } CREDS_UNIX_SEC;
55 typedef struct ntsec_creds
57 DOM_SID sid;
58 uint32 num_grps;
59 uint32 *grp_rids;
61 } CREDS_NT_SEC;
63 typedef struct user_creds
65 BOOL reuse;
67 uint32 ptr_ntc;
68 uint32 ptr_uxc;
69 uint32 ptr_nts;
70 uint32 ptr_uxs;
71 uint32 ptr_ssk;
73 CREDS_NT ntc;
74 CREDS_UNIX uxc;
76 CREDS_NT_SEC nts;
77 CREDS_UNIX_SEC uxs;
79 uchar usr_sess_key[16];
81 } CREDS_HYBRID;
83 typedef struct cred_command
85 uint16 version;
86 uint16 command;
87 uint32 pid; /* unique process id */
89 fstring name;
91 uint32 ptr_creds;
92 CREDS_HYBRID *cred;
94 } CREDS_CMD;
96 #endif /* _RPC_CREDS_H */