r23792: convert Samba4 to GPLv3
[kai/samba.git] / source / libnet / userman.h
1 /* 
2    Unix SMB/CIFS implementation.
3
4    Copyright (C) Rafal Szczesniak 2005
5    
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10    
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15    
16    You should have received a copy of the GNU General Public License
17    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20
21 /*
22  * IO structures for userman.c functions
23  */
24
25 struct libnet_rpc_useradd {
26         struct {
27                 struct policy_handle domain_handle;
28                 const char *username;
29         } in;
30         struct {
31                 struct policy_handle user_handle;
32         } out;
33 };
34
35
36 struct libnet_rpc_userdel {
37         struct {
38                 struct policy_handle domain_handle;
39                 const char *username;
40         } in;
41         struct {
42                 struct policy_handle user_handle;
43         } out;
44 };
45
46
47 #define USERMOD_FIELD_ACCOUNT_NAME    ( 0x00000001 )
48 #define USERMOD_FIELD_FULL_NAME       ( 0x00000002 )
49 #define USERMOD_FIELD_DESCRIPTION     ( 0x00000010 )
50 #define USERMOD_FIELD_COMMENT         ( 0x00000020 )
51 #define USERMOD_FIELD_HOME_DIRECTORY  ( 0x00000040 )
52 #define USERMOD_FIELD_HOME_DRIVE      ( 0x00000080 )
53 #define USERMOD_FIELD_LOGON_SCRIPT    ( 0x00000100 )
54 #define USERMOD_FIELD_PROFILE_PATH    ( 0x00000200 )
55 #define USERMOD_FIELD_WORKSTATIONS    ( 0x00000400 )
56 #define USERMOD_FIELD_LOGON_HOURS     ( 0x00002000 )
57 #define USERMOD_FIELD_ACCT_EXPIRY     ( 0x00004000 )
58 #define USERMOD_FIELD_ACCT_FLAGS      ( 0x00100000 )
59 #define USERMOD_FIELD_PARAMETERS      ( 0x00200000 )
60 #define USERMOD_FIELD_COUNTRY_CODE    ( 0x00400000 )
61 #define USERMOD_FIELD_CODE_PAGE       ( 0x00800000 )
62
63 struct libnet_rpc_usermod {
64         struct {
65                 struct policy_handle domain_handle;
66                 const char *username;
67
68                 struct usermod_change {
69                         uint32_t fields;    /* bitmask field */
70
71                         const char *account_name;
72                         const char *full_name;
73                         const char *description;
74                         const char *comment;
75                         const char *logon_script;
76                         const char *profile_path;
77                         const char *home_directory;
78                         const char *home_drive;
79                         const char *workstations;
80                         struct timeval *acct_expiry;
81                         struct timeval *allow_password_change;
82                         struct timeval *force_password_change;
83                         struct timeval *last_logon;
84                         struct timeval *last_logoff;
85                         struct timeval *last_password_change;
86                         uint32_t acct_flags;
87                 } change;
88         } in;
89 };
90
91
92 /*
93  * Monitor messages sent from userman.c functions
94  */
95
96 struct msg_rpc_create_user {
97         uint32_t rid;
98 };
99
100
101 struct msg_rpc_lookup_name {
102         uint32_t *rid;
103         uint32_t count;
104 };