1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

27 Commits

Author SHA1 Message Date
Andrew Tridgell
ced5dc4e05 fixed a net crash bug if we can't find a DC in a 'net rpc' command 0001-01-01 00:00:00 +00:00
Andrew Bartlett
71452365c8 Clean this code up a little. If it's alrady asprintf()ed, I see no
need for a manual strdup() too...
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f089002682 Rafal 'Mimir' Szczesniak <mimir@diament.ists.pwr.wroc.pl> has been busy
again, and has added 'net rpc trustdom list' support.

This lists the trusted and trusting domains of a remote PDC.

I've applied these almost directly, just fixing some special
case code for when there are *no* trusting domains.  We still
have some parse errors in this case however.

Andrew Bartlett.


From mimir's e-mail:

Here are another patches adding trust relationship features.
More details:

    Better error reporting in cli_lsa_enum_trust_dom().
    Implementation of cli_samr_enum_dom_users() which cli_samr.c
    lacked.

    More "consts" -- one of arguments in net_find_dc().
    Modified implementation of run_rpc_command() -- now it
    allows to reuse already opened connection (if it is passed)
    to remote server's IPC$ (e.g. as part of longer exchange
    of rpc calls). I'm sure Andrew will argue ;-)
    More neat version of rpc_trustdom_list() function.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
8196ee908e Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had a
distinction between uchar and char).

Lots of const etc.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Tridgell
a7663428e0 added useful 'net rpc info' command
this also gives a way to distinguish a 'native mode' server from a
non-native server. This call will fail for a native mode server.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
abc2aed26c make net join a bit less verbose
these errors happen all the time, so they shouldn't be level 0
0001-01-01 00:00:00 +00:00
Jim McDonough
fd938eca21 Add remainder of net rpc file subcommands, and autoselect transport on
net file
0001-01-01 00:00:00 +00:00
Jim McDonough
ebd07c3a29 Enable all net rpc share subcommands and autoselect transport. 0001-01-01 00:00:00 +00:00
Jim McDonough
77418256d3 Enable net rpc share and net rpc file commands (list subcommands only), and
autoselect for this subcommand when appropriate.
0001-01-01 00:00:00 +00:00
Gerald Carter
b41cefb4c0 merge from SAMBA_2_2 0001-01-01 00:00:00 +00:00
Jim McDonough
45ac4f4c29 Start of net rpc group command. List only right now. Add and delete have
not been implemented...is it worth the effort?
0001-01-01 00:00:00 +00:00
Andrew Bartlett
0bdd94cb99 Partly based on the work by mimir (Rafal Szczesniak
<mimir@diament.ists.pwr.wroc.pl>) this patch allows samba to correctly
enumerate its trusted domains - by exaimining the keys in the secrets.tdb file.

This patch has been tested with both NT4 and rpcclient/wbinfo, and adds
some extra functionality to talloc and rpc_parse to allow it to deal with
already unicode strings.

Finally, this cleans up some const warnings that were in net_rpc.c by pushing
another dash of const into the rpc client code.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Tim Potter
6d9336f3b9 Fixed debugs. 0001-01-01 00:00:00 +00:00
Jim McDonough
9daa5788c8 Lots more net consistency work:
- Added net_help.c for unified help when possible
- Added net rpc user listing, delete, info commands
- Unified net user command to autodetect ads/rpc/rap (try in that order)
- Added generic routine for detecting rpc (protocol > PROTOCOL_NT1)
- I'm sure I forgot something.
0001-01-01 00:00:00 +00:00
Tim Potter
1f007d3ed4 Renamed get_nt_error_msg() to nt_errstr(). 0001-01-01 00:00:00 +00:00
Jim McDonough
936df31df5 Don't use // even temporarily, lest ye forget it and check it in... 0001-01-01 00:00:00 +00:00
Jim McDonough
c8a4a09b56 Change net rpc join several ways: \n\t1) expose \n\t2) eliminate oldstyle subcommand \n\t3) try oldstyle first, then more secure method\n to allow for autodetect between ads and rpc on net join 0001-01-01 00:00:00 +00:00
Jim McDonough
17775dae28 Some help cleanups. Formatting and consistency issues. Line up text nicely, and make 'net help rap user' the same as 'net rap user help'...stuff like that 0001-01-01 00:00:00 +00:00
Andrew Tridgell
a21ba95897 nicer output from "net rpc user add" 0001-01-01 00:00:00 +00:00
Andrew Bartlett
770c8a31d9 The beginning of trusted and trusting domain support from
Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl>

This adds the 'net' tools to manipulate the trusted domains.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
51c985be7f Add 'net rpc shutdown' and 'net rpc abortshutdown'.
These two little features are very useful, but the passing of options about
needs some serious work.  The popt stuff in the shutdown code is #ifdef'ed out
until the main popt loop can be convinced not to chew on the options :-(

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
2efae7cc52 Add a pile of doxygen style comments to various parts of Samba. Many of these
probably will never actually be genearted, but I like the style in any case.

Also fix a segfault in 'net rpc' when the login failed and a small memory leak
on failure in the auth_info.c code.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
575897e879 OK. Smbpasswd -j is DEAD.
This moves the rest of the functionality into the 'net rpc join' code.

Futhermore, this moves that entire area over to the libsmb codebase, rather
than the crufty old rpc_client stuff.

I have also fixed up the smbpasswd -a -m bug in the process.

We also have a new 'net rpc changetrustpw' that can be called from a
cron-job to regularly change the trust account password, for sites
that run winbind but not smbd.

With a little more work, we can kill rpc_client from smbd entirly!
(It is mostly the domain auth stuff - which I can rework - and the
spoolss stuff that sombody else will need to look over).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
1197689bc5 Add a mechinism to allow for sane porting of rpcclient components into the new
'net' command.

This also gets us 'net rpc user add'.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
c0b7ee6ee5 Add 'net rpc join' to match the ADS equiv.
This kills off the offending code in smbpasswd -j -Uab%c

In the process we have changed from unsing compelatly random passwords
to random, 15 char ascii strings.  While this does produce a decrese in
entropy, it is still vastly greater than we need, considering the application.

In the meantime this allows us to actually *type* the machine account
password duruign debugging.

This code also adds a 'check' step to the join, confirming that the
stored password does indeed do somthing of value :-)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
8739d426ca This is another major rework of the 'net' command.
This time, all the existing functionality has been moved into
'net rap', ready for new commands in the 'net ads' and 'net rpc' categories.

In particular, we hope to have the abilty to autoselect the appropriate
backend to use based on smb.conf or other paramaters.

This will allow 'net user' to work no matter what the remote server.

The new 'net rpc' command will soon gain a 'net rpc join' and a
'net rpc user' based on the existing samba code.

Also in this commit, the connection establishment code has been almost entirly
reworked, and now has some minor sense of sainity to it.
In particular, we can now connect to hosts *other* than localhost!

We also have the ability to state on a per-command basis whether the 'localhost'
is a sane default value.  (A net join, for example, would not be sane against
localhost).

Unfortunetly we have had to make the basic paramaters global variables, but
the 'cli' is not opened and closed on a per-command basis.

Andrew Bartlett
0001-01-01 00:00:00 +00:00