summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_xml.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-11-06 12:26:21 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-11-06 12:26:21 +0000
commit809c4715da211df96482fb82427f0d3797119b7a (patch)
treecb7a30976ec6560ef886f5b8169901f67edf708d /source3/passdb/pdb_xml.c
parent5f119d4597fcd373ce56a4166b393098f3557edd (diff)
downloadsamba-809c4715da211df96482fb82427f0d3797119b7a.tar.gz
samba-809c4715da211df96482fb82427f0d3797119b7a.tar.bz2
samba-809c4715da211df96482fb82427f0d3797119b7a.zip
Adapt to latest pdb API changes - only thing left is group support
(This used to be commit 99a2e7fde1fd4e589035c273f40419ef322e097d)
Diffstat (limited to 'source3/passdb/pdb_xml.c')
-rw-r--r--source3/passdb/pdb_xml.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source3/passdb/pdb_xml.c b/source3/passdb/pdb_xml.c
index 4a48600388..53e2e342ba 100644
--- a/source3/passdb/pdb_xml.c
+++ b/source3/passdb/pdb_xml.c
@@ -381,7 +381,6 @@ static NTSTATUS xmlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT
fstring sid_str;
xmlNodePtr cur, user, pass, root;
pdb_xml *data;
- uint32 store = pdb_get_init_flag(u);
DEBUG(10, ("xmlsam_add_sam_account called!\n"));
@@ -409,7 +408,7 @@ static NTSTATUS xmlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT
user = xmlNewChild(data->users, data->ns, "user", NULL);
xmlNewProp(user, "sid",
sid_to_string(sid_str, pdb_get_user_sid(u)));
- if (store & PDB_UID)
+ if (pdb_get_init_flags(u, PDB_UID) != PDB_DEFAULT)
xmlNewProp(user, "uid", iota(pdb_get_uid(u)));
if (pdb_get_username(u) && strcmp(pdb_get_username(u), ""))
@@ -419,18 +418,18 @@ static NTSTATUS xmlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT
xmlNewProp(cur, "sid",
sid_to_string(sid_str, pdb_get_group_sid(u)));
- if (store & PDB_GID)
+ if (pdb_get_init_flags(u, PDB_GID) != PDB_DEFAULT)
xmlNewProp(cur, "gid", iota(pdb_get_gid(u)));
- if (store & PDB_LOGONTIME)
+ if (pdb_get_init_flags(u, PDB_LOGONTIME) != PDB_DEFAULT)
xmlNewChild(user, data->ns, "login_time",
iota(pdb_get_logon_time(u)));
- if (store & PDB_LOGOFFTIME)
+ if (pdb_get_init_flags(u, PDB_LOGOFFTIME) != PDB_DEFAULT)
xmlNewChild(user, data->ns, "logoff_time",
iota(pdb_get_logoff_time(u)));
- if (store & PDB_KICKOFFTIME)
+ if (pdb_get_init_flags(u, PDB_KICKOFFTIME) != PDB_DEFAULT)
xmlNewChild(user, data->ns, "kickoff_time",
iota(pdb_get_kickoff_time(u)));
@@ -475,11 +474,11 @@ static NTSTATUS xmlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT
pass = xmlNewChild(user, data->ns, "password", NULL);
if (pdb_get_pass_last_set_time(u))
xmlNewProp(pass, "last_set", iota(pdb_get_pass_last_set_time(u)));
- if (store & PDB_CANCHANGETIME)
+ if (pdb_get_init_flags(u, PDB_CANCHANGETIME) != PDB_DEFAULT)
xmlNewProp(pass, "can_change",
iota(pdb_get_pass_can_change_time(u)));
- if (store & PDB_MUSTCHANGETIME)
+ if (pdb_get_init_flags(u, PDB_MUSTCHANGETIME) != PDB_DEFAULT)
xmlNewProp(pass, "must_change",
iota(pdb_get_pass_must_change_time(u)));