summaryrefslogtreecommitdiffstats
path: root/source/utils/net_rpc.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix compiler warning - cli_lsa_query_info_policy actually returns theTim Potter2003-04-041-3/+5
| | | | | domain name. We were passing in an already initialised string which was causing the warning.
* Use new interface for cli_samr_query_dispinfo().Tim Potter2003-01-291-2/+9
|
* BIG patch...Andrew Bartlett2003-01-021-18/+5
| | | | | | | | | | | | | | | | This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett
* fix also net rpc shutdownSimo Sorce2002-12-301-10/+1
| | | | sorry
* Forward port the change to talloc_init() to make all talloc contextsJeremy Allison2002-12-201-6/+6
| | | | | named. Ensure we can query them. Jeremy.
* Having waited for *way* too long, this is mimir's namecache and trusted domainAndrew Bartlett2002-11-261-3/+4
| | | | | | | | | | | | cache code. This uses gencache, mimir's new caching code that stores at text-based cache of various data. Mimir has done a *lot* of work on this patch, and it is finally time to get it in CVS. Andrew Bartlett
* Add samdump and vampire to 'net rpc help'Andrew Bartlett2002-11-151-0/+2
| | | | Andrew Bartlett
* Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison2002-11-121-7/+4
| | | | | | dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy.
* try to put every security descriptors related definitions in the same file.Simo Sorce2002-10-061-2/+2
| | | | | | also try to uniform names to a clean scheme. first part.
* merge of new client side support the Win2k LSARPC UUID in rpcbindGerald Carter2002-10-041-27/+27
| | | | from APP_HEAD
* Minor updates:Andrew Bartlett2002-09-271-5/+14
| | | | | | | | | | 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
* Cosmetic fix for debug message.Volker Lendecke2002-09-231-2/+1
|
* First code for 'net rpc vampire'. We should probably find a moreVolker Lendecke2002-09-181-1/+1
| | | | | | positive name for this. It creates users and global groups. More to come. Volker
* Add a synonym for samdump ...Richard Sharpe2002-09-181-0/+1
|
* This is the 'easy' parts of the trusted domains patch n+3 patch fromAndrew Bartlett2002-09-061-0/+8
| | | | | | | | | | | | Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl> It includes a conversion of make_user_info*() to NTSTATUS and some minor changes to other files. It also picks up on a nasty segfault that can occour in some security=domain cases. Andrew Bartlett
* Fix segfault in net commandVolker Lendecke2002-09-011-1/+1
|
* 'No news is good news' might sometimes be confusing, at least to me :-)Volker Lendecke2002-08-281-1/+7
| | | | Volker
* added a 'net rpc samdump' command for dumping the whole sam viaAndrew Tridgell2002-08-221-0/+1
| | | | samsync operations (as a BDC)
* Add 'net rpc getsid' to fetch the PDC's SID into the local secrets.tdbVolker Lendecke2002-08-211-1/+55
| | | | | | Print domain SID on 'net rpc info' Volker
* just comment typosVolker Lendecke2002-08-211-15/+15
|
* added 'net rpc testjoin' and 'net ads testjoin' commandsAndrew Tridgell2002-08-051-0/+2
| | | | | unfortuately we don't seem to be able to auto-test the ADS join due to a rather nasty property of the GSSAPI library.
* This fixes a number of ADS problems, particularly with netbioslessAndrew Tridgell2002-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setups. - split up the ads structure into logical pieces. This makes it much easier to keep things like the authentication realm and the server realm separate (they can be different). - allow ads callers to specify that no sasl bind should be performed (used by "net ads info" for example) - fix an error with handing ADS_ERROR_SYSTEM() when errno is 0 - completely rewrote the code for finding the LDAP server. Now try DNS methods first, and try all DNS servers returned from the SRV DNS query, sorted by closeness to our interfaces (using the same sort code as we use in replies from WINS servers). This allows us to cope with ADS DCs that are down, and ensures we don't pick one that is on the other side of the country unless absolutely necessary. - recognise dnsRecords as binary when displaying them - cope with the realm not being configured in smb.conf (work it out from the LDAP server) - look at the trustDirection when looking up trusted domains and don't include trusts that trust our domains but we don't trust theirs. - use LDAP to query the alternate (netbios) name for a realm, and make sure that both and long and short forms of the name are accepted by winbindd. Use the short form by default for listing users/groups. - rescan the list of trusted domains every 5 minutes in case new trust relationships are added while winbindd is running - include transient trust relationships (ie. C trusts B, B trusts A, so C trusts A) in winbindd. - don't do a gratuituous node status lookup when finding an ADS DC (we don't need it and it could fail) - remove unused sid_to_distinguished_name function - make sure we find the allternate name of our primary domain when operating with a netbiosless ADS DC (using LDAP to do the lookup) - fixed the rpc trusted domain enumeration to support up to approx 2000 trusted domains (the old limit was 3) - use the IP for the remote_machine (%m) macro when the client doesn't supply us with a name via a netbios session request (eg. port 445) - if the client uses SPNEGO then use the machine name from the SPNEGO auth packet for remote_machine (%m) macro - add new 'net ads workgroup' command to find the netbios workgroup name for a realm
* fixed a net crash bug if we can't find a DC in a 'net rpc' commandAndrew Tridgell2002-07-311-0/+4
|
* Clean this code up a little. If it's alrady asprintf()ed, I see noAndrew Bartlett2002-07-281-2/+3
| | | | need for a manual strdup() too...
* Rafal 'Mimir' Szczesniak <mimir@diament.ists.pwr.wroc.pl> has been busyAndrew Bartlett2002-07-271-53/+306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had aAndrew Bartlett2002-07-201-2/+2
| | | | | | | | distinction between uchar and char). Lots of const etc. Andrew Bartlett
* added useful 'net rpc info' commandAndrew Tridgell2002-07-131-0/+76
| | | | | 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.
* make net join a bit less verboseAndrew Tridgell2002-06-281-1/+1
| | | | these errors happen all the time, so they shouldn't be level 0
* Add remainder of net rpc file subcommands, and autoselect transport onJim McDonough2002-06-011-9/+135
| | | | net file
* Enable all net rpc share subcommands and autoselect transport.Jim McDonough2002-05-311-2/+55
|
* Enable net rpc share and net rpc file commands (list subcommands only), andJim McDonough2002-05-311-4/+196
| | | | autoselect for this subcommand when appropriate.
* merge from SAMBA_2_2Gerald Carter2002-05-111-0/+8
|
* Start of net rpc group command. List only right now. Add and delete haveJim McDonough2002-05-091-1/+153
| | | | not been implemented...is it worth the effort?
* Partly based on the work by mimir (Rafal SzczesniakAndrew Bartlett2002-04-141-18/+22
| | | | | | | | | | | | | | <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
* Fixed debugs.Tim Potter2002-04-141-2/+2
|
* Lots more net consistency work:Jim McDonough2002-04-051-12/+332
| | | | | | | | - 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.
* Renamed get_nt_error_msg() to nt_errstr().Tim Potter2002-03-171-8/+8
|
* Don't use // even temporarily, lest ye forget it and check it in...Jim McDonough2002-03-161-3/+3
|
* Change net rpc join several ways: \n\t1) expose \n\t2) eliminate oldstyle ↵Jim McDonough2002-03-151-16/+17
| | | | subcommand \n\t3) try oldstyle first, then more secure method\n to allow for autodetect between ads and rpc on net join
* Some help cleanups. Formatting and consistency issues. Line up text ↵Jim McDonough2002-03-151-6/+38
| | | | nicely, and make 'net help rap user' the same as 'net rap user help'...stuff like that
* nicer output from "net rpc user add"Andrew Tridgell2002-03-151-0/+6
|
* The beginning of trusted and trusting domain support fromAndrew Bartlett2002-03-011-2/+370
| | | | | | | | Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl> This adds the 'net' tools to manipulate the trusted domains. Andrew Bartlett
* Removed version number from file header.Tim Potter2002-01-301-1/+0
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Add 'net rpc shutdown' and 'net rpc abortshutdown'.Andrew Bartlett2001-12-311-7/+168
| | | | | | | | 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
* Add a pile of doxygen style comments to various parts of Samba. Many of theseAndrew Bartlett2001-12-301-47/+227
| | | | | | | | | 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
* OK. Smbpasswd -j is DEAD.Andrew Bartlett2001-12-051-5/+63
| | | | | | | | | | | | | | | | | | | 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
* Add a mechinism to allow for sane porting of rpcclient components into the newAndrew Bartlett2001-12-051-0/+166
| | | | | | | | 'net' command. This also gets us 'net rpc user add'. Andrew Bartlett
* Add 'net rpc join' to match the ADS equiv.Andrew Bartlett2001-12-041-1/+2
| | | | | | | | | | | | | | | | 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
* This is another major rework of the 'net' command.Andrew Bartlett2001-12-031-0/+36
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