diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-12 23:20:50 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-12 23:20:50 +0000 |
commit | 2f194322d419350f35a48dff750066894d68eccf (patch) | |
tree | b0501eaf874ca8e740a51a8e0f29d261e32e0093 /source3/utils/pdbedit.c | |
parent | f2b669b37fecda2687860eba4a15801dc89855dc (diff) | |
download | samba-2f194322d419350f35a48dff750066894d68eccf.tar.gz samba-2f194322d419350f35a48dff750066894d68eccf.tar.xz samba-2f194322d419350f35a48dff750066894d68eccf.zip |
Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
Diffstat (limited to 'source3/utils/pdbedit.c')
-rw-r--r-- | source3/utils/pdbedit.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 1199dec7fb3..6a019e73d71 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -50,7 +50,6 @@ #define MASK_ALWAYS_GOOD 0x0000001F #define MASK_USER_GOOD 0x00001F00 -extern pstring global_myname; /********************************************************* Add all currently available users to another db @@ -176,7 +175,7 @@ static int print_sam_info (SAM_ACCOUNT *sam_pwent, BOOL verbosity, BOOL smbpwdst Get an Print User Info **********************************************************/ -static int print_user_info (struct pdb_context *in, char *username, BOOL verbosity, BOOL smbpwdstyle) +static int print_user_info (struct pdb_context *in, const char *username, BOOL verbosity, BOOL smbpwdstyle) { SAM_ACCOUNT *sam_pwent=NULL; BOOL ret; @@ -496,7 +495,7 @@ int main (int argc, char **argv) poptGetArg(pc); /* Drop argv[0], the program name */ if (user_name == NULL) { - user_name = poptGetArg(pc); + user_name = strdup(poptGetArg(pc)); } if (!lp_load(dyn_CONFIGFILE,True,False,False)) { @@ -504,16 +503,8 @@ 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); + if (!init_names()) + exit(1); setparms = (backend ? BIT_BACKEND : 0) + (verbose ? BIT_VERBOSE : 0) + |