Merge from Subversion r50.
[nivanova/samba-autobuild/.git] / source3 / include / tdbsam2.h
1 /*
2  * Unix SMB/CIFS implementation. 
3  * tdbsam2 genstruct enabled header file
4  * Copyright (C) Simo Sorce 2002
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License as published by the Free
8  * Software Foundation; either version 2 of the License, or (at your option)
9  * any later version.
10  * 
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with
17  * this program; if not, write to the Free Software Foundation, Inc., 675
18  * Mass Ave, Cambridge, MA 02139, USA.
19  */
20
21 /* ALL strings assumes UTF8 as encoding */
22
23 GENSTRUCT struct tdbsam2_domain_data {
24         uint32 xcounter;                /* counter to be updated at any change */
25
26         SEC_DESC *sec_desc;             /* Security Descriptor */
27         DOM_SID *dom_sid;               /* The Domain SID */
28         char *name; _NULLTERM           /* NT Domain Name */
29         char *description; _NULLTERM    /* Descritpion (Gecos) */
30
31         uint32 next_rid;                /* The Next free RID */
32 };
33
34 GENSTRUCT struct tdbsam2_user_data {
35         uint32 xcounter;                /* counter to be updated at any change */
36
37         SEC_DESC *sec_desc;             /* Security Descriptor */
38         DOM_SID *user_sid;              /* The User SID */
39         char *name; _NULLTERM           /* NT User Name */
40         char *description; _NULLTERM    /* Descritpion (Gecos) */
41
42         DOM_SID *group_sid;             /* The Primary Group SID */
43
44         NTTIME *logon_time;
45         NTTIME *logoff_time;
46         NTTIME *kickoff_time;
47         NTTIME *pass_last_set_time;
48         NTTIME *pass_can_change_time;
49         NTTIME *pass_must_change_time;
50         
51         char *full_name; _NULLTERM      /* The Full Name */
52         char *home_dir; _NULLTERM       /* Home Directory */
53         char *dir_drive; _NULLTERM      /* Drive Letter the home should be mapped to */
54         char *logon_script; _NULLTERM   /* Logon script path */
55         char *profile_path; _NULLTERM   /* Profile is stored here */
56         char *workstations; _NULLTERM   /* List of Workstation names the user is allowed to LogIn */
57         char *unknown_str; _NULLTERM    /* Guess ... Unknown */
58         char *munged_dial; _NULLTERM    /* Callback Number */
59
60         /* passwords are 16 byte leght, pointer is null if no password */
61         uint8 *lm_pw_ptr; _LEN(16)      /* Lanman hashed password */
62         uint8 *nt_pw_ptr; _LEN(16)      /* NT hashed password */
63
64         uint16 logon_divs;              /* 168 - num of hours in a week */
65         uint32 hours_len;               /* normally 21 */
66         uint8 *hours; _LEN(hours_len)   /* normally 21 bytes (depends on hours_len) */
67
68         uint32 unknown_3;               /* 0x00ff ffff */
69         uint32 unknown_5;               /* 0x0002 0000 */
70         uint32 unknown_6;               /* 0x0000 04ec */
71 };
72
73 GENSTRUCT struct tdbsam2_group_data {
74         uint32 xcounter;                /* counter to be updated at any change */
75
76         SEC_DESC *sec_desc;             /* Security Descriptor */
77         DOM_SID *group_sid;             /* The Group SID */
78         char *name; _NULLTERM           /* NT Group Name */
79         char *description; _NULLTERM    /* Descritpion (Gecos) */
80
81         uint32 count;                   /* number of sids */
82         DOM_SID **members; _LEN(count)  /* SID array */
83 };
84
85 GENSTRUCT struct tdbsam2_privilege_data {
86         uint32 xcounter;                /* counter to be updated at any change */
87
88         LUID_ATTR *privilege;           /* Privilege */
89         char *name; _NULLTERM           /* NT User Name */
90         char *description; _NULLTERM    /* Descritpion (Gecos) */
91
92         uint32 count;                   /* number of sids */
93         DOM_SID **members; _LEN(count)  /* SID array */
94 };
95