1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-12 21:58:10 +03:00

72 Commits

Author SHA1 Message Date
Andrew Bartlett
192148bab3 More safe_strcpy() off-by-one bug fixes. (mostly moves to pstrcpy()/fstrcpy())
Andrew Bartlett
(This used to be commit 42b5514404bc7e33306c11344c6c934a1f83d295)
2003-03-06 07:55:48 +00:00
Andrew Bartlett
04efc2dcf7 Try the PASSWD environment variable if we don't have one from the command line.
(This used to be commit 14d7d8b22993ca7f1c273a7baaccb09c8fa04ef9)
2003-03-03 09:16:21 +00:00
Jelmer Vernooij
5eb7b6113b Add -V option (to print out version) to utilities where possible
(pdbedit already has a -V option..)
(This used to be commit 5de622968d95c1436dbd34edc8d0a9bbff68916b)
2003-02-18 18:43:59 +00:00
Jim McDonough
19938c0d2c Properly display popt errors. Also fix debug to be -d for consistency with other progs.
(This used to be commit 97133f7168852dc185dbf4492afcaf4b68180f65)
2003-01-21 13:58:16 +00:00
Tim Potter
7b69c6a48c Deleted arguments to help output - they didn't work.
(This used to be commit 8b167a45a6ae041cd35dbf2a25d7a300f86440a2)
2003-01-21 03:45:18 +00:00
Gerald Carter
43e4cae106 * removed unused variable from rpcclient code
* added container option to net command (patch from SuSE)
* Makefile patch for examples/VFS from SuSE
(This used to be commit 4a6d8280ea27ca7a6998219aacc4b15b1227a659)
2003-01-15 16:07:14 +00:00
Andrew Bartlett
6d66fb308a BIG patch...
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
(This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2003-01-02 09:07:17 +00:00
Jeremy Allison
250c980119 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
2002-11-12 23:15:52 +00:00
Andrew Bartlett
8ce292d96f Fix bug where not specifying '-S PDC' in 'net join' would cause it to attempt
to contact a random IP address.

Andrew Bartlett
(This used to be commit e6837a85605f258da1fa9ac7ad329bc62392f29a)
2002-11-09 02:36:47 +00:00
Tim Potter
ea24bb2da8 Merge of get_dc_list() api change. This was slightly more intrusive
than the version in APPLIANCE so watch out for boogs.
(This used to be commit 1e054e3db654801fbb5580211529cdfdea9ed686)
2002-11-06 01:29:07 +00:00
Volker Lendecke
68026338e9 Implement 'net maxrid'. Needed to find the maximum current rid to
set 'algorithmic rid base' correctly after a 'net rpc vampire'.

Volker
(This used to be commit 5c0869be321852919dba1566c6bcab02e4657541)
2002-10-28 12:55:22 +00:00
Jeremy Allison
389a16d9d5 Added new error codes. Fix up connection code to retry in the same way
that app-head does.
Jeremy.
(This used to be commit b521abd86b10573ca8f9116907c81e6deb55f049)
2002-10-17 17:10:29 +00:00
Andrew Bartlett
d95e86b8b9 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 used to be commit 31bdbeef0ea6f30247cd3b30cfea57b34102abe6)
2002-09-27 04:33:58 +00:00
Richard Sharpe
587c4c5aa6 Add net getlocalsid [name]
(This used to be commit 08c3e2b824cd2c93ca548fa18ea16a18f5b197e5)
2002-09-23 16:46:32 +00:00
Volker Lendecke
cd2924f94e Add the ability to view/set the current local domain SIDs.
Volker
(This used to be commit f6ed429838cc0140c0d033875012c7a999891549)
2002-09-23 10:05:15 +00:00
Andrew Tridgell
cdca2ad1c4 added gencache implementation from mimir - thanks!
(This used to be commit 05a202c287f5daeb1ccbaf9479aa93e7928e93db)
2002-09-11 14:07:21 +00:00
Volker Lendecke
e573a2a32c global_myname is a pstring, not an fstring
(This used to be commit 2df34c9bfc76ee832e5005a2ad0ff0b6abb98034)
2002-08-21 19:39:38 +00:00
Volker Lendecke
1ea5e17f95 Fix debug level initialization for net.c
Volker
(This used to be commit 5af5326f1311a49d3c8316e1dcc27037b831065a)
2002-08-21 11:48:05 +00:00
Tim Potter
11785c7bc8 Use common popt definition for -d option.
(This used to be commit 8c17904848a6206ab35652625ff5f3afcf6bcb0d)
2002-07-29 09:25:23 +00:00
Andrew Bartlett
2a03547b61 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.
(This used to be commit f0890026820ee3e432147130b46de4610e583381)
2002-07-27 00:15:02 +00:00
Andrew Tridgell
f5880f3fe8 move opt_machine_pass to keep some compilers happy
(This used to be commit 39e11ef5b1090e51c6c447c8037a43b52e04b881)
2002-07-14 03:49:15 +00:00
Andrew Tridgell
351831683d added --machine-pass option to net. This allows you to authenticate as
the current machine account and password. This is useful both for
diagnostics and domain leave.
(This used to be commit 73b246981fd5b27cc1d835946b89e82f5b78f332)
2002-07-13 11:42:53 +00:00
Andrew Bartlett
0746576113 Update cli_full_connection() to take a 'flags' paramater, and try to get a
few more places to use it.

Andrew Bartlett
(This used to be commit 23689b0746d5ab030d8693abf71dd2e80ec1d7c7)
2002-06-25 08:57:24 +00:00
Jim McDonough
125432c73a Add remainder of net rpc file subcommands, and autoselect transport on
net file
(This used to be commit fd938eca210602790c4d0e442f3aa9aa22b5fdf2)
2002-06-01 01:03:04 +00:00
Jim McDonough
4e71eae06e Enable all net rpc share subcommands and autoselect transport.
(This used to be commit ebd07c3a295e3f8cd46441caac4dc8e8b178c2cc)
2002-05-31 21:10:49 +00:00
Jim McDonough
1b9c519dc9 Enable net rpc share and net rpc file commands (list subcommands only), and
autoselect for this subcommand when appropriate.
(This used to be commit 77418256d3162b41a672a25f7e512999f1193926)
2002-05-31 17:03:48 +00:00
Andrew Bartlett
98d5699d28 Some of the updates from ctrlsoft's 'Various' patch:
- convert net to popt
- convert status to popt
- adapt examples/pdb/ to multiple passdb system
- add dynamic debug class example to examples/pdb/

and some reformatting to better match the samba coding style.

Andrew Bartlett
(This used to be commit 2498bc69d4e5c38ec385f640489daa94c508c726)
2002-05-24 09:57:48 +00:00
Andrew Bartlett
9c3d5d6fd0 Remove the password length paramater from cli_full_connection - it really
didn't make any sense, and its was always just strlen(password) anyway.

This fixes it to be strlen(password)+1

Andrew Bartlett
(This used to be commit c205b18bd6b9b69200ff3db55f2c641631d4ab40)
2002-05-24 05:14:16 +00:00
Jim McDonough
90554c046e Converged net group command.
(This used to be commit 95cc3fa4d3e566f540090ed499e80d86eb55e895)
2002-05-09 23:49:40 +00:00
Jim McDonough
1458b7c795 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.
(This used to be commit 9daa5788c822cf1ad20dc703e7f03b9ee82987bf)
2002-04-05 01:36:28 +00:00
Jim McDonough
f21cfd9413 Multiple changes:
- Get rid of improper "Invalid option: d (100)" message when setting
  debug from commandline.
- Eliminate got_pass global and only use opt_password.  This enables
  re-use of password that may have been enetered in failed ads connect.
- Auto-detect method for net user command
- use new net_ads_check rather than lp_security==ADS test on net join
- Get rid of annoying debug level 0's
(This used to be commit 1280968000595c28ed62d9e74acecfdc84e33710)
2002-04-04 16:53:07 +00:00
Jim McDonough
a3f0bd0b68 Add ability to get specific net ads subcommand help. Not all have been
implemented yet...
(This used to be commit 24c6bf4e8b6d519340d5f9f3353ffc6b5f7520b3)
2002-04-04 02:54:47 +00:00
Andrew Bartlett
73c45a4a6f There is no reason we can't join a domain with secuirty=user. In fact we
need to when we are a BDC or a PDC doing a self-join.

Andrew Bartlett
(This used to be commit 996cd3a0979a92b087003982bc61796a8090a787)
2002-03-21 11:54:43 +00:00
Tim Potter
ab13654dc9 Renamed get_nt_error_msg() to nt_errstr().
(This used to be commit 1f007d3ed41c1b71a89fa6be7d173e67e927c302)
2002-03-17 04:36:35 +00:00
Jim McDonough
e9394d5238 Add autodetect for net join, as well as some more help updates
(This used to be commit 951006374e48d80a5128d870bdc255bf8c22cb6a)
2002-03-15 22:04:53 +00:00
Jim McDonough
bb38f48f6f 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
(This used to be commit 17775dae28c724b11cc73f2aeac5f07f9656046c)
2002-03-15 20:03:07 +00:00
Andrew Bartlett
75de5a5dfa 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
(This used to be commit 770c8a31d9804d3339ffa0de8b5072a5c7eb02df)
2002-03-01 02:56:35 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-30 06:08:46 +00:00
Jim McDonough
de260eadf9 Enable net ads commands to use existing tickets if the user doesn't specify a username on the commandline. Also don't continue past the kinit if a password is entered and fails because existing tickets would be used, which may not be desired if the username was specified.
(This used to be commit 7e5d7dfa834c0161460bde8a2f0d4824c0a0d1fe)
2002-01-25 22:07:46 +00:00
Andrew Bartlett
a0681820e6 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
(This used to be commit 51c985be7fbfe5627c5b2590e7610653e7be98e3)
2001-12-31 13:00:59 +00:00
Andrew Tridgell
6722cfc3e6 added net lookup command
(This used to be commit 51268c512dbae94aba308668df9facaf15a2ce9e)
2001-12-20 07:42:00 +00:00
Andrew Tridgell
bed11a34ba net now sends its debug to stderr so its output can be relied upon in
scripts
(This used to be commit 6d2f7ed708e75687d23f432ba9a186e88fa14118)
2001-12-20 07:13:47 +00:00
Tim Potter
69e0fe9972 Display a nice error message for NT_STATUS_LOGON_FAILURE in connect_to_ipc()
(This used to be commit 60eb4dc7b1114275f035d27a890e0301a65e0e42)
2001-12-14 03:55:09 +00:00
Tim Potter
9f6b241175 Set the debuglevel after the call to lp_load() so the change sticks.
(This used to be commit 3c927e39e7354d2f65b3ff7148fc325b41552310)
2001-12-14 02:14:59 +00:00
Andrew Tridgell
0ae4916299 improved error message from failed connect
(This used to be commit 4405a87fb754cece3a5428246ea6ecb9abba1996)
2001-12-13 08:54:51 +00:00
Andrew Tridgell
32ba2c889f added a net time command. Allow display or set of system time based on
a SMB server

particularly useful for ADS is:

	net time set -S DOMAIN#1B

this makes kerberos clock skew problems go away :)
(This used to be commit b3ba2293d0e4eac3b6408c3abc3dcacfa3f67fe4)
2001-12-11 05:21:50 +00:00
Tim Potter
4589265bb0 Removed unreferenced getopt() externals.
(This used to be commit c87d1ad32114200d3e678f8de88874c737f8e571)
2001-12-11 04:25:21 +00:00
Andrew Tridgell
0c29881501 reinstated all the rap commands as top level commands until we get the
protocol switch mechanism in place
(This used to be commit d20c3717dd58745da082d1b4df7698c6d6c38e6c)
2001-12-10 22:25:21 +00:00
Andrew Bartlett
8ba00d147b 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
(This used to be commit 575897e879fc175ba702adf245384033342c903d)
2001-12-05 11:00:26 +00:00
Andrew Bartlett
f98d753b2f Make it easier to construct anonymous connections with a new flag and helper
function.
(This used to be commit 61b0f5f4f9788784b0806a9a15cbc6bf1005aa68)
2001-12-05 03:14:21 +00:00