summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2002-08-21 19:48:56 +0000
committerVolker Lendecke <vlendec@samba.org>2002-08-21 19:48:56 +0000
commit30e51241ecdda2724c441e372e6f99857719630f (patch)
tree7d092c0e739ff461a6295590b10ff043f806f790 /source3
parente573a2a32c1ff01bc09215efae6927f4795b4ef6 (diff)
downloadsamba-30e51241ecdda2724c441e372e6f99857719630f.tar.gz
samba-30e51241ecdda2724c441e372e6f99857719630f.tar.bz2
samba-30e51241ecdda2724c441e372e6f99857719630f.zip
pdbedit needs global_myname to be set in order to display the
user SIDs correctly. Volker (This used to be commit 287b7bda11100c42f2cdea36a20a81f6ea397f43)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/pdbedit.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index 51dbbb98c0..7c61e6d8be 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -508,6 +508,17 @@ int main (int argc, char **argv)
exit(1);
}
+ if (!*global_myname) {
+ char *p2;
+
+ pstrcpy(global_myname, myhostname());
+ p2 = strchr_m(global_myname, '.');
+ if (p2)
+ *p2 = 0;
+ }
+
+ strupper(global_myname);
+
setparms = (config_file ? BIT_CONFIGFILE : 0) +
(new_debuglevel ? BIT_DEBUGLEVEL : 0) +
(backend ? BIT_BACKEND : 0) +
@@ -544,7 +555,7 @@ int main (int argc, char **argv)
/* the lowest bit options are always accepted */
checkparms = setparms & ~MASK_ALWAYS_GOOD;
- /* accoun tpolicy operations */
+ /* account policy operations */
if ((checkparms & BIT_ACCPOLICY) && !(checkparms & ~(BIT_ACCPOLICY + BIT_ACCPOLVAL))) {
uint32 value;
int field = account_policy_name_to_fieldnum(account_policy);