diff options
author | Michael Adam <obnox@samba.org> | 2011-10-06 21:24:07 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 14:17:58 +0200 |
commit | c9bc1e492404077c6b40b5cefe33e859503a4227 (patch) | |
tree | 8a38bfafafe0af9f8ee912ac87d53e62c4e2134d /source3/utils | |
parent | 658f72128ff6950c6a03994198b4464a273fb300 (diff) | |
download | samba-c9bc1e492404077c6b40b5cefe33e859503a4227.tar.gz samba-c9bc1e492404077c6b40b5cefe33e859503a4227.tar.bz2 samba-c9bc1e492404077c6b40b5cefe33e859503a4227.zip |
s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
for consistency and better error propagation
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_idmap.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index 08ef920dde..3a3ae21f07 100644 --- a/source3/utils/net_idmap.c +++ b/source3/utils/net_idmap.c @@ -258,6 +258,7 @@ static int net_idmap_restore(struct net_context *c, int argc, const char **argv) char line[128], sid_string[128]; int len; unsigned long idval; + NTSTATUS status; if (fgets(line, 127, input) == NULL) break; @@ -282,16 +283,19 @@ static int net_idmap_restore(struct net_context *c, int argc, const char **argv) break; } } else if (sscanf(line, "USER HWM %lu", &idval) == 1) { - ret = dbwrap_store_int32(db, "USER HWM", idval); - if (ret != 0) { - d_fprintf(stderr, _("Could not store USER HWM.\n")); + status = dbwrap_store_int32(db, "USER HWM", idval); + if (!NT_STATUS_IS_OK(status)) { + d_fprintf(stderr, + _("Could not store USER HWM: %s\n"), + nt_errstr(status)); break; } } else if (sscanf(line, "GROUP HWM %lu", &idval) == 1) { - ret = dbwrap_store_int32(db, "GROUP HWM", idval); - if (ret != 0) { + status = dbwrap_store_int32(db, "GROUP HWM", idval); + if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, - _("Could not store GROUP HWM.\n")); + _("Could not store GROUP HWM: %s\n"), + nt_errstr(status)); break; } } else { |