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 | #include "librpc/gen_ndr/misc.h"
|
---|
21 |
|
---|
22 |
|
---|
23 | /*
|
---|
24 | * IO structures for userman.c functions
|
---|
25 | */
|
---|
26 |
|
---|
27 | struct libnet_rpc_useradd {
|
---|
28 | struct {
|
---|
29 | struct policy_handle domain_handle;
|
---|
30 | const char *username;
|
---|
31 | } in;
|
---|
32 | struct {
|
---|
33 | struct policy_handle user_handle;
|
---|
34 | } out;
|
---|
35 | };
|
---|
36 |
|
---|
37 |
|
---|
38 | struct libnet_rpc_userdel {
|
---|
39 | struct {
|
---|
40 | struct policy_handle domain_handle;
|
---|
41 | const char *username;
|
---|
42 | } in;
|
---|
43 | struct {
|
---|
44 | struct policy_handle user_handle;
|
---|
45 | } out;
|
---|
46 | };
|
---|
47 |
|
---|
48 |
|
---|
49 | #define USERMOD_FIELD_ACCOUNT_NAME ( 0x00000001 )
|
---|
50 | #define USERMOD_FIELD_FULL_NAME ( 0x00000002 )
|
---|
51 | #define USERMOD_FIELD_DESCRIPTION ( 0x00000010 )
|
---|
52 | #define USERMOD_FIELD_COMMENT ( 0x00000020 )
|
---|
53 | #define USERMOD_FIELD_HOME_DIRECTORY ( 0x00000040 )
|
---|
54 | #define USERMOD_FIELD_HOME_DRIVE ( 0x00000080 )
|
---|
55 | #define USERMOD_FIELD_LOGON_SCRIPT ( 0x00000100 )
|
---|
56 | #define USERMOD_FIELD_PROFILE_PATH ( 0x00000200 )
|
---|
57 | #define USERMOD_FIELD_WORKSTATIONS ( 0x00000400 )
|
---|
58 | #define USERMOD_FIELD_LOGON_HOURS ( 0x00002000 )
|
---|
59 | #define USERMOD_FIELD_ACCT_EXPIRY ( 0x00004000 )
|
---|
60 | #define USERMOD_FIELD_ACCT_FLAGS ( 0x00100000 )
|
---|
61 | #define USERMOD_FIELD_PARAMETERS ( 0x00200000 )
|
---|
62 | #define USERMOD_FIELD_COUNTRY_CODE ( 0x00400000 )
|
---|
63 | #define USERMOD_FIELD_CODE_PAGE ( 0x00800000 )
|
---|
64 |
|
---|
65 | struct libnet_rpc_usermod {
|
---|
66 | struct {
|
---|
67 | struct policy_handle domain_handle;
|
---|
68 | const char *username;
|
---|
69 |
|
---|
70 | struct usermod_change {
|
---|
71 | uint32_t fields; /* bitmask field */
|
---|
72 |
|
---|
73 | const char *account_name;
|
---|
74 | const char *full_name;
|
---|
75 | const char *description;
|
---|
76 | const char *comment;
|
---|
77 | const char *logon_script;
|
---|
78 | const char *profile_path;
|
---|
79 | const char *home_directory;
|
---|
80 | const char *home_drive;
|
---|
81 | const char *workstations;
|
---|
82 | struct timeval *acct_expiry;
|
---|
83 | struct timeval *allow_password_change;
|
---|
84 | struct timeval *force_password_change;
|
---|
85 | struct timeval *last_logon;
|
---|
86 | struct timeval *last_logoff;
|
---|
87 | struct timeval *last_password_change;
|
---|
88 | uint32_t acct_flags;
|
---|
89 | } change;
|
---|
90 | } in;
|
---|
91 | };
|
---|
92 |
|
---|
93 |
|
---|
94 | /*
|
---|
95 | * Monitor messages sent from userman.c functions
|
---|
96 | */
|
---|
97 |
|
---|
98 | struct msg_rpc_create_user {
|
---|
99 | uint32_t rid;
|
---|
100 | };
|
---|
101 |
|
---|
102 |
|
---|
103 | struct msg_rpc_lookup_name {
|
---|
104 | uint32_t *rid;
|
---|
105 | uint32_t count;
|
---|
106 | };
|
---|