mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
Minor updates:
Add const to some more functions, and reintroduce 'net rpc join oldstyle' as *only* trying an old-style join. This means that we can rely on it not prompting for a password on the build farm. Andrew Bartlett
This commit is contained in:
parent
ce00a3238e
commit
31bdbeef0e
@ -95,7 +95,7 @@ BOOL secrets_delete(const char *key)
|
||||
return tdb_delete(tdb, kbuf) == 0;
|
||||
}
|
||||
|
||||
BOOL secrets_store_domain_sid(char *domain, const DOM_SID *sid)
|
||||
BOOL secrets_store_domain_sid(const char *domain, const DOM_SID *sid)
|
||||
{
|
||||
fstring key;
|
||||
|
||||
@ -104,7 +104,7 @@ BOOL secrets_store_domain_sid(char *domain, const DOM_SID *sid)
|
||||
return secrets_store(key, sid, sizeof(DOM_SID));
|
||||
}
|
||||
|
||||
BOOL secrets_fetch_domain_sid(char *domain, DOM_SID *sid)
|
||||
BOOL secrets_fetch_domain_sid(const char *domain, DOM_SID *sid)
|
||||
{
|
||||
DOM_SID *dyn_sid;
|
||||
fstring key;
|
||||
@ -128,7 +128,7 @@ BOOL secrets_fetch_domain_sid(char *domain, DOM_SID *sid)
|
||||
return True;
|
||||
}
|
||||
|
||||
BOOL secrets_store_domain_guid(char *domain, GUID *guid)
|
||||
BOOL secrets_store_domain_guid(const char *domain, GUID *guid)
|
||||
{
|
||||
fstring key;
|
||||
|
||||
@ -137,7 +137,7 @@ BOOL secrets_store_domain_guid(char *domain, GUID *guid)
|
||||
return secrets_store(key, guid, sizeof(GUID));
|
||||
}
|
||||
|
||||
BOOL secrets_fetch_domain_guid(char *domain, GUID *guid)
|
||||
BOOL secrets_fetch_domain_guid(const char *domain, GUID *guid)
|
||||
{
|
||||
GUID *dyn_guid;
|
||||
fstring key;
|
||||
|
@ -277,8 +277,13 @@ struct cli_state *net_make_ipc_connection(unsigned flags)
|
||||
} else {
|
||||
nt_status = connect_to_ipc(&cli, &server_ip, server_name);
|
||||
}
|
||||
|
||||
SAFE_FREE(server_name);
|
||||
return cli;
|
||||
if (NT_STATUS_IS_OK(nt_status)) {
|
||||
return cli;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static int net_user(int argc, const char **argv)
|
||||
|
@ -309,15 +309,24 @@ static int rpc_join_usage(int argc, const char **argv)
|
||||
* Main 'net_rpc_join()' (where the admain username/password is used) is
|
||||
* in net_rpc_join.c
|
||||
* Assume if a -U is specified, it's the new style, otherwise it's the
|
||||
* old style
|
||||
* old style. If 'oldstyle' is specfied explicity, do it and don't prompt.
|
||||
**/
|
||||
|
||||
int net_rpc_join(int argc, const char **argv)
|
||||
{
|
||||
if ((net_rpc_join_oldstyle(argc, argv) == 0))
|
||||
return 0;
|
||||
struct functable func[] = {
|
||||
{"oldstyle", net_rpc_join_oldstyle},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
return net_rpc_join_newstyle(argc, argv);
|
||||
if (argc == 0) {
|
||||
if ((net_rpc_join_oldstyle(argc, argv) == 0))
|
||||
return 0;
|
||||
|
||||
return net_rpc_join_newstyle(argc, argv);
|
||||
}
|
||||
|
||||
return net_run_function(argc, argv, func, rpc_join_usage);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user