summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-13 19:12:06 +0000
committerJeremy Allison <jra@samba.org>2001-04-13 19:12:06 +0000
commit2ef68c7e92d4661664f0410509f7cb551e74a198 (patch)
tree7a3ea392bf8664e28ad46b2edb1afd750335ccc9 /source3/utils
parent14748b0bf56239695cadb6aa40d9095259ebb6e2 (diff)
downloadsamba-2ef68c7e92d4661664f0410509f7cb551e74a198.tar.gz
samba-2ef68c7e92d4661664f0410509f7cb551e74a198.tar.bz2
samba-2ef68c7e92d4661664f0410509f7cb551e74a198.zip
Merge of Andrew's changes in 2.2.
Jeremy. (This used to be commit fc76681812b1469208ad6c8847afdfc68bc6db49)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcacls.c11
-rw-r--r--source3/utils/smbcontrol.c4
2 files changed, 6 insertions, 9 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 6f5bcc4476..4803da9f33 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -74,7 +74,7 @@ BOOL got_policy_hnd;
/* Open cli connection and policy handle */
-static BOOL open_policy_hnd(void)
+static BOOL cacls_open_policy_hnd(void)
{
creds.pwd.null_pwd = 1;
@@ -117,7 +117,7 @@ static void SidToString(fstring str, DOM_SID *sid)
/* Ask LSA to convert the sid to a name */
- if (!open_policy_hnd() ||
+ if (!cacls_open_policy_hnd() ||
cli_lsa_lookup_sids(&lsa_cli, &pol, 1, sid, &names, &types,
&num_names) != NT_STATUS_NOPROBLEMO ||
!names || !names[0]) {
@@ -145,7 +145,7 @@ static BOOL StringToSid(DOM_SID *sid, char *str)
return string_to_sid(sid, str);
}
- if (!open_policy_hnd() ||
+ if (!cacls_open_policy_hnd() ||
cli_lsa_lookup_names(&lsa_cli, &pol, 1, &str, &sids, &types,
&num_sids) != NT_STATUS_NOPROBLEMO) {
result = False;
@@ -815,9 +815,8 @@ You can string acls together with spaces, commas or newlines\n\
extern FILE *dbf;
int opt;
char *p;
- int seed;
static pstring servicesf = CONFIGFILE;
- struct cli_state *cli;
+ struct cli_state *cli=NULL;
enum acl_mode mode;
char *the_acl = NULL;
enum chown_mode change_mode = REQUEST_NONE;
@@ -863,8 +862,6 @@ You can string acls together with spaces, commas or newlines\n\
}
}
- seed = time(NULL);
-
while ((opt = getopt(argc, argv, "U:nhS:D:A:M:C:G:t")) != EOF) {
switch (opt) {
case 'U':
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 26c01ced9e..c5462ea1fb 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -97,7 +97,7 @@ Prints out the current Profile level returned by MSG_PROFILELEVEL
void profilelevel_function(int msg_type, pid_t src, void *buf, size_t len)
{
int level;
- char *s;
+ char *s=NULL;
memcpy(&level, buf, sizeof(int));
if (level) {
@@ -175,7 +175,7 @@ static BOOL do_command(char *dest, char *msg_name, char *params[])
{
int i, n, v;
int mtype;
- BOOL retval;
+ BOOL retval=False;
int debuglevel_class[DBGC_LAST];
mtype = parse_type(msg_name);