diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2002-09-26 15:03:26 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2002-09-26 15:03:26 +0000 |
commit | 791d9e8facb221d0532922a39f83ca06f84e99f2 (patch) | |
tree | dc2f84c09bd0f36b653d4a89715299297772e4e2 /examples/pdb | |
parent | f90e9ae2443fe3c1e72a8a8e751937a324c6dc87 (diff) | |
download | samba-791d9e8facb221d0532922a39f83ca06f84e99f2.tar.gz samba-791d9e8facb221d0532922a39f83ca06f84e99f2.tar.bz2 samba-791d9e8facb221d0532922a39f83ca06f84e99f2.zip |
Change pdb_xml functions to return NTSTATUS
(This used to be commit 834fcd23959ed202a84069bf19390103f563540c)
Diffstat (limited to 'examples/pdb')
-rw-r--r-- | examples/pdb/xml/pdb_xml.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/examples/pdb/xml/pdb_xml.c b/examples/pdb/xml/pdb_xml.c index 17261873cd..5de27bc6e2 100644 --- a/examples/pdb/xml/pdb_xml.c +++ b/examples/pdb/xml/pdb_xml.c @@ -287,23 +287,24 @@ xmlNodePtr parseSambaXMLFile(struct pdb_xml *data) return cur; } -static BOOL xmlsam_setsampwent(struct pdb_methods *methods, BOOL update) +static NTSTATUS xmlsam_setsampwent(struct pdb_methods *methods, BOOL update) { pdb_xml *data; if (!methods) { DEBUG(0, ("Invalid methods\n")); - return False; + return NT_STATUS_INVALID_PARAMETER; } data = (pdb_xml *) methods->private_data; if (!data) { DEBUG(0, ("Invalid pdb_xml_data\n")); - return False; + return NT_STATUS_INVALID_PARAMETER; } data->pwent = parseSambaXMLFile(data); if (!data->pwent) - return False; - return True; + return NT_STATUS_UNSUCCESSFUL; + + return NT_STATUS_OK; } /*************************************************************** @@ -335,19 +336,19 @@ static void xmlsam_endsampwent(struct pdb_methods *methods) Get one SAM_ACCOUNT from the list (next in line) *****************************************************************/ -static BOOL xmlsam_getsampwent(struct pdb_methods *methods, SAM_ACCOUNT * user) +static NTSTATUS xmlsam_getsampwent(struct pdb_methods *methods, SAM_ACCOUNT * user) { pdb_xml *data; if (!methods) { DEBUG(0, ("Invalid methods\n")); - return False; + return NT_STATUS_INVALID_PARAMETER; } data = (pdb_xml *) methods->private_data; if (!data) { DEBUG(0, ("Invalid pdb_xml_data\n")); - return False; + return NT_STATUS_INVALID_PARAMETER; } while (data->pwent) { @@ -356,18 +357,18 @@ static BOOL xmlsam_getsampwent(struct pdb_methods *methods, SAM_ACCOUNT * user) parseUser(data->doc, data->ns, data->pwent, user); data->pwent = data->pwent->next; - return True; + return NT_STATUS_OK; } data->pwent = data->pwent->next; } - return False; + return NT_STATUS_UNSUCCESSFUL; } /*************************************************************************** Adds an existing SAM_ACCOUNT ****************************************************************************/ -static BOOL xmlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT * u) +static NTSTATUS xmlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT * u) { pstring temp; fstring sid_str; @@ -379,13 +380,13 @@ static BOOL xmlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT * u) if (!methods) { DEBUG(0, ("Invalid methods\n")); - return False; + return NT_STATUS_INVALID_PARAMETER; } data = (pdb_xml *) methods->private_data; if (!data) { DEBUG(0, ("Invalid pdb_xml_data\n")); - return False; + return NT_STATUS_INVALID_PARAMETER; } /* Create a new document if we can't open the current one */ @@ -504,7 +505,7 @@ static BOOL xmlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT * u) xmlNewChild(user, data->ns, "unknown_6", iota(pdb_get_unknown6(u))); xmlSaveFile(data->location, data->doc); - return True; + return NT_STATUS_OK; } NTSTATUS pdb_init(PDB_CONTEXT * pdb_context, PDB_METHODS ** pdb_method, |