diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-10-01 13:10:57 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-10-01 13:10:57 +0000 |
commit | ad8a22e570c8970247dc76defc9be2b768bd102d (patch) | |
tree | e672142a6c857da134cc893e5ebe7cef08791d19 /source3/utils | |
parent | 8147df0b6b4674670e70b45c603e8323e5c61c33 (diff) | |
download | samba-ad8a22e570c8970247dc76defc9be2b768bd102d.tar.gz samba-ad8a22e570c8970247dc76defc9be2b768bd102d.tar.bz2 samba-ad8a22e570c8970247dc76defc9be2b768bd102d.zip |
Updates from Samba HEAD:
- Fix segfaults in the 'net ads' commands when no password is provided
- Readd --with-ldapsam for 2.2 compatability. This conditionally compiles the
old options, but the actual code is available on all ldap systems.
- Fix shadow passwords (as per work with vl)
- Fix sending plaintext passwords to unicode servers (again vl)
- Add a bit of const to secrets.c functions
- Fix some spelling and grammer by vance.
- Document the -r option in smbgroupedit.
There are more changes in HEAD, I'm only merging the changes I've been involved
with.
Andrew Bartlett
(This used to be commit 83973c389355a5cc9ca74af467dfd8b5dabd2c8f)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net.c | 7 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 19 | ||||
-rw-r--r-- | source3/utils/smbgroupedit.c | 1 |
3 files changed, 21 insertions, 6 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c index 800aeded0a..b3b72e2465 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -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) diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 8b8278b053..11f73a1387 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -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; - - return net_rpc_join_newstyle(argc, argv); + struct functable func[] = { + {"oldstyle", net_rpc_join_oldstyle}, + {NULL, NULL} + }; + + 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); } diff --git a/source3/utils/smbgroupedit.c b/source3/utils/smbgroupedit.c index cf5ac1f025..589dafc231 100644 --- a/source3/utils/smbgroupedit.c +++ b/source3/utils/smbgroupedit.c @@ -52,6 +52,7 @@ static void usage(void) printf(" -c SID change group\n"); printf(" -u unix group\n"); printf(" -d description group description\n"); + printf(" -r rid RID of new group\n"); printf(" -x group delete this group\n"); printf("\n"); printf(" -t[b|d|l] type: builtin, domain, local \n"); |