mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
registry: untangle assignments and if statements in regdb_set_secdesc().
Michael
(This used to be commit d553b5d725
)
This commit is contained in:
parent
40e6ec16ee
commit
18a407de8c
@ -916,19 +916,19 @@ static WERROR regdb_set_secdesc(const char *key,
|
||||
char *tdbkey;
|
||||
WERROR err = WERR_NOMEM;
|
||||
TDB_DATA tdbdata;
|
||||
int tdb_ret;
|
||||
|
||||
|
||||
ZERO_STRUCT(ps);
|
||||
|
||||
if (!(tdbkey = talloc_asprintf(mem_ctx, "%s/%s", REG_SECDESC_PREFIX,
|
||||
key))) {
|
||||
tdbkey = talloc_asprintf(mem_ctx, "%s/%s", REG_SECDESC_PREFIX, key);
|
||||
if (tdbkey == NULL) {
|
||||
goto done;
|
||||
}
|
||||
normalize_dbkey(tdbkey);
|
||||
|
||||
if (secdesc == NULL) {
|
||||
/* assuming a delete */
|
||||
int tdb_ret;
|
||||
|
||||
tdb_ret = dbwrap_trans_delete(regdb,
|
||||
string_term_tdb_data(tdbkey));
|
||||
if (tdb_ret == -1) {
|
||||
@ -947,8 +947,9 @@ static WERROR regdb_set_secdesc(const char *key,
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (dbwrap_trans_store(regdb, string_term_tdb_data(tdbkey),
|
||||
tdbdata, 0) == -1) {
|
||||
tdb_ret = dbwrap_trans_store(regdb, string_term_tdb_data(tdbkey),
|
||||
tdbdata, 0);
|
||||
if (tdb_ret == -1) {
|
||||
err = ntstatus_to_werror(map_nt_error_from_unix(errno));
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user