2 Unix SMB/CIFS implementation.
4 Copyright (C) Rafal Szczesniak <mimir@samba.org> 2005
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 2 of the License, or
9 (at your option) any later version.
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.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 struct libnet_CreateUser {
24 const char *user_name;
25 const char *domain_name;
28 const char *error_string;
33 struct libnet_DeleteUser {
35 const char *user_name;
36 const char *domain_name;
39 const char *error_string;
44 struct libnet_ModifyUser {
46 const char *user_name;
47 const char *domain_name;
49 const char *account_name;
50 const char *full_name;
51 const char *description;
52 const char *home_directory;
53 const char *home_drive;
55 const char *logon_script;
56 const char *profile_path;
57 struct timeval *acct_expiry;
58 struct timeval *allow_password_change;
59 struct timeval *force_password_change;
60 struct timeval *last_logon;
61 struct timeval *last_logoff;
62 struct timeval *last_password_change;
66 const char *error_string;
71 #define SET_FIELD_LSA_STRING(new, current, mod, field, flag) \
72 if (new.field != NULL && \
73 !strequal_w(current->field.string, new.field)) { \
75 mod->field = talloc_strdup(mem_ctx, new.field); \
76 if (mod->field == NULL) return NT_STATUS_NO_MEMORY; \
78 mod->fields |= flag; \
81 #define SET_FIELD_NTTIME(new, current, mod, field, flag) \
82 if (new.field != 0) { \
83 NTTIME newval = timeval_to_nttime(new.field); \
84 if (newval != current->field) { \
85 mod->field = talloc_memdup(mem_ctx, new.field, sizeof(*new.field)); \
86 if (mod->field == NULL) return NT_STATUS_NO_MEMORY; \
87 mod->fields |= flag; \