summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@us.ibm.com>2012-04-24 14:33:46 -0700
committerVolker Lendecke <vl@samba.org>2012-04-30 13:07:20 +0200
commitbe8180e030ec922ae75b747c2bf4c5551740c404 (patch)
tree3c431d783efc09b1256094a544ca28384f5448fc /source3
parent6e583c72cc0c235a997c700342e8dc14cb65ec29 (diff)
downloadsamba-be8180e030ec922ae75b747c2bf4c5551740c404.tar.gz
samba-be8180e030ec922ae75b747c2bf4c5551740c404.tar.bz2
samba-be8180e030ec922ae75b747c2bf4c5551740c404.zip
net: Let get*sid return error from passdb init
When initialize_password_db returns an error this means that the SID stored in the backend cannot be read. Return this error directly instead of creating a random SID through get_global_sam_sid. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Apr 30 13:07:20 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 70ed0aa47a..1ce5ee6582 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -247,8 +247,8 @@ static int net_getlocalsid(struct net_context *c, int argc, const char **argv)
}
if(!initialize_password_db(false, NULL)) {
- DEBUG(0, ("WARNING: Could not open passdb - local sid may not reflect passdb\n"
- "backend knowledge (such as the sid stored in LDAP)\n"));
+ d_fprintf(stderr, _("WARNING: Could not open passdb\n"));
+ return 1;
}
/* first check to see if we can even access secrets, so we don't
@@ -327,10 +327,8 @@ static int net_getdomainsid(struct net_context *c, int argc, const char **argv)
}
if(!initialize_password_db(false, NULL)) {
- DEBUG(0, ("WARNING: Could not open passdb - domain SID may "
- "not reflect passdb\n"
- "backend knowledge (such as the SID stored in "
- "LDAP)\n"));
+ d_fprintf(stderr, _("WARNING: Could not open passdb\n"));
+ return 1;
}
/* first check to see if we can even access secrets, so we don't