From be8180e030ec922ae75b747c2bf4c5551740c404 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Tue, 24 Apr 2012 14:33:46 -0700 Subject: 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 Autobuild-Date: Mon Apr 30 13:07:20 CEST 2012 on sn-devel-104 --- source3/utils/net.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source3/utils') 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 -- cgit