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

245 Commits

Author SHA1 Message Date
Volker Lendecke
dc1bcec73c s3: Add --use-ccache to net 2010-01-24 20:32:17 +01:00
Kai Blin
66de52c4f4 s3 net: Fix compile warnings 2010-01-19 14:48:34 +01:00
Kai Blin
09bc13728f s3 net/i18n: Use only one spelling for "Usage:" 2010-01-19 10:07:36 +01:00
Björn Jacke
bd3c922e2b s3/net: split up some printable stings to ease i18n
If we put strings like "Usage:" into separate _() macros and not the whole
"Usage:..." string we can cover much more messages by only one single
translation. The drawback is that the message in the sources looks less pretty.
2010-01-18 23:45:05 +01:00
Günther Deschner
ebe0e64ba9 s3: use enum netr_SchannelType all over the place.
Guenther
2009-10-13 10:21:46 +02:00
Volker Lendecke
0cf317f36f s3: Remove the lua interpreter again
This was meant to support async winbind. But as the hairy parts of async
winbind (getgrent) are done without it, it can go again.
2009-09-29 13:51:43 +02:00
Kai Blin
49d1eec8ea s3 net: Add getauthuser/setauthuser commands.
These replace the functionality of wbinfo --get-auth-user/--set-auth-user
2009-08-18 19:53:38 +02:00
Jeremy Allison
88fd98b7c4 Fix EVERY SINGLE build on the buildfarm that doesn't have
bindtextdomain or textdomain. C'mon, this is what configure.in
is *FOR*.
Jeremy.
2009-08-12 17:44:48 -07:00
Kai Blin
d2eb7f8853 s3 net: Initial top level support. 2009-07-29 23:46:09 +02:00
Volker Lendecke
033185e2a1 Make the smbd VFS typesafe 2009-07-24 11:42:05 -04:00
Kai Blin
8f5ef10633 Revert "net: Use samba default command line arguments."
This reverts commit fb262f79fa
and related commits c36031778e
72fd5fa6bb and
38cd0e086f

This change caused more trouble than it solved. We need to do this differently.
Reverting so we don't accidently release this.
2009-07-22 13:39:34 +02:00
Volker Lendecke
8a17cd810f Make gencache more stable
This provides a compromise between stability and performance: gencache is a
persistent database these days that for performance reasons can not use tdb
transactions for all writes. This patch splits up gencache into gencache.tdb
and gencache_notrans.tdb. gencache_notrans is used with CLEAR_IF_FIRST, writes
to it don't use transactions. By default every 5 minutes and when a program
exits, all entries from _notrans.tdb are transferred to gencache.tdb in one
transaction.
2009-07-15 10:55:20 +02:00
Kai Blin
fb262f79fa net: Use samba default command line arguments.
Attention:

The meaning of the -N flag changed.
To get the old meaning for net groupmap set, use the long option --ntname
The long option for using kerberos changed from --kerberos to --use-kerberos

net rpc commands will now prompt for a password if none is given.

As a benefit, net will now accept an authentication file like other samba
command line tools. So no need to specify the password on the command line in
scripts anymore.

This should fix bug #6357

Signed-off-by: Kai Blin <kai@samba.org>
2009-05-25 23:35:38 +02:00
Günther Deschner
e89cc775e6 s3-net: make "net eventlog" help output a little more appropriate.
Guenther
2009-04-29 11:47:27 +02:00
Stefan Metzmacher
257809558b s3:net: add --request-timeout option
metze
2009-04-17 21:46:47 +02:00
Volker Lendecke
46bcb10b5a Shape up pdb_search a bit by making it a talloc ctx with a destructor 2009-03-07 17:51:21 +01:00
Günther Deschner
21d23bf7e8 s3-net: add "net eventlog dump".
This allows to dump a native (non-wrapped) win32 *.evt eventlog file.

Guenther
2009-02-04 19:01:31 +01:00
Volker Lendecke
09e6dfb8e8 net lua
This adds a lua command line interpreter with some sample code how to build
your own data types based on our internal data types.

Not meant as the final word, but as a playground for experiments for people.
Might be removed later when we find this turns out to be too awkward.
2008-12-17 12:57:19 +01:00
Tim Prouty
1eb743ab8e s3: Change sockaddr util function names for consistency
Also eliminates name conflicts with OneFS system libraries
2008-12-03 10:40:20 -08:00
Michael Adam
7f3495726f vampire keytab: add command line switch --clean-old-entries .
This allows to control cleaning the keytab.
It will only clean old occurences of keys that are replicated in
this run. So if you want to ensure things are cleaned up, combine
this switch with --force-full-repl or --single-obj-repl (+dn list).

Michael
(This used to be commit 21385e1c63)
2008-08-01 16:08:00 +02:00
Michael Adam
03b6502dc6 vampire keytab: introduce switch --single-obj-repl.
This controls whether single object replication is to be used.
This only has an effect when at least one object dn is given
on the commandline.

NOTE: Now the default is to use normal replication with uptodateness
vectors and use object dns given on the command line as a positive
write filter. Single object replication is only performed when this
new switch is specified.

Michael
(This used to be commit 0f81111ea8)
2008-08-01 16:07:59 +02:00
Michael Adam
5330164ec4 net rpc vampire: rename --repl-nodiff to --force-full-repl.
This more clear.

Michael
(This used to be commit 0ddde9aae8)
2008-08-01 16:07:58 +02:00
Michael Adam
c655e295ef vampire keytab: add switch --repl-nodiff to trigger full replication.
I.e. replication without keeping track of the up to date vector.

Michael
(This used to be commit d4b36e447b)
2008-08-01 16:07:04 +02:00
Günther Deschner
6913f986f4 net: add "-k" switch for kerberos authentication (in preparation for #5416).
Guenther
(This used to be commit 4cce94d464)
2008-07-31 13:53:53 +02:00
Kai Blin
accc68f63e net: Don't crash on invalid command line options.
This backs out the workaround Jerry added in
4c3bfea9f8.
Thanks for the catch.
(This used to be commit 20e0bb4800)
2008-06-21 00:07:21 +02:00
Kai Blin
255bdb2602 net: Rename functable3 to functable, get rid of old functables
(This used to be commit bb7c5fc4ec)
2008-06-10 09:48:21 +02:00
Kai Blin
0f1b3ed5c0 net: Autogenerate "net help" output from net's functable.
(This used to be commit 0feb40bc84)
2008-06-10 09:45:36 +02:00
Kai Blin
2ca10c462d net: Use functable3
(This used to be commit 122dfe876d)
2008-06-10 09:45:34 +02:00
Kai Blin
223d1bce77 net: Use functable2 to give a short help text for top-level functions.
(This used to be commit e9be24a2cb)
2008-06-10 09:45:28 +02:00
Kai Blin
6fd35d25bf net: Move net_run_function/net_run_function2 to net_util.c
(This used to be commit 73fb5f392d)
2008-06-10 09:45:14 +02:00
Günther Deschner
20ec11ac28 net: fix debuglevel handling.
Kai, that one actually needs to stay a global external variable in order to
support debuglevel definition only on the commandline for net.

Guenther
(This used to be commit f6ba7333ab)
2008-06-05 18:49:21 +02:00
Günther Deschner
913a323623 net: fix popt context memleak.
Guenther
(This used to be commit 60bce92574)
2008-06-04 02:44:24 +02:00
Kai Blin
f9a6d1f264 net: Split out "net share"
(This used to be commit 25d4c6f692)
2008-05-20 14:28:01 +02:00
Kai Blin
00f6ad7b5a net: Split out "net afs"
(This used to be commit 3f10527f79)
2008-05-20 14:27:56 +02:00
Kai Blin
b596529041 net: Move more utility functions into net_util.c
(This used to be commit 0f5ebdf0bc)
2008-05-20 14:27:53 +02:00
Kai Blin
c9ca6092fe net: Split out "net file"
(This used to be commit 84a116be9c)
2008-05-20 14:27:47 +02:00
Kai Blin
007f0e19dc net: Split out "net group"
(This used to be commit 3ddd9c09e3)
2008-05-20 14:27:40 +02:00
Kai Blin
572de942c7 net: Split out "net user"
(This used to be commit 4ca08a5acc)
2008-05-20 14:27:27 +02:00
Kai Blin
666292129b net: Move "net join" handling into a separate file.
(This used to be commit d0237a7368)
2008-05-20 14:27:24 +02:00
Kai Blin
16938883e6 net: Use true/false instead of True/False.
(This used to be commit a8b567aac3)
2008-05-20 14:27:08 +02:00
Kai Blin
f576910944 net: Remove globals
(This used to be commit 1e9319cf88)
2008-05-10 09:22:27 +02:00
Kai Blin
378527215e net: Some whitespace clean-up.
(This used to be commit 4dcce8b653)
2008-05-10 09:22:19 +02:00
Günther Deschner
ba0bf87d96 net: Add libnetapi context to net's impressive list of globals.
Guenther
(This used to be commit 8a5fadf6a1)
2008-04-21 20:21:40 +02:00
Günther Deschner
0a362a94c8 net/libnetapi: Include netapi headers early and free on exit.
Guenther
(This used to be commit 020b1e6431)
2008-04-16 02:16:08 +02:00
Michael Adam
fb6fb69966 net: add a "net registry" subcommand to locally access the registry.
The interface is like that of net rpc registry.
Access is direct local access to the registry tdb through reg_api.

Michael
(This used to be commit 3250068eb9)
2008-03-28 16:19:35 +01:00
Volker Lendecke
3b9680264a Fix Coverity ID 479
(This used to be commit 70b33397ba)
2008-03-23 18:28:23 +01:00
Jeremy Allison
160fefc71a Fix args to cli_force_encryption.
Jeremy.
(This used to be commit 7b0826aeec)
2008-01-05 00:41:48 -08:00
Jeremy Allison
9baa97a46e Add general '-e' option to enable smb encryption
on tools.
Jeremy.
(This used to be commit 757653966f)
2008-01-05 00:23:35 -08:00
Volker Lendecke
2e07c2ade8 s/sid_to_string/sid_to_fstring/
least surprise for callers
(This used to be commit eb523ba776)
2007-12-15 22:47:30 +01:00
Jeremy Allison
7faee02d0d Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
(This used to be commit 52dc5eaef2)
2007-12-10 11:30:37 -08:00
Karolin Seeger
bf80f40ca4 Make output of net getdomainsid more meaningful. Unify spelling of SID. Display usage if superfluous arguments are given.
Karolin
(This used to be commit cb3a2dfeb0)
2007-12-06 16:34:36 +01:00
Volker Lendecke
107c1f854d Reformatting
(This used to be commit 28c0a77ec1)
2007-12-03 10:53:29 +01:00
Günther Deschner
a43e3f98ad Add "net dom" command suite to "net".
Guenther
(This used to be commit a41f9aef84)
2007-11-30 22:25:01 +01:00
Michael Adam
25a6a677df Allow calling "net rpc join" and "net rpc trustdom" without specifying server IP.
This was a logic bug (typo) in a call to get_pdc_ip() in net_find_server().

Michael
(This used to be commit 988c5ff3f4)
2007-11-29 15:16:45 +01:00
Jeremy Allison
d4307679b9 Change all occurrences of zero_addr(&ss,AF_INET) to
zero_addr(&ss). All current uses were always of the
AF_INET form, so simplify the call. If in the future
we need to zero an addr to AF_INET6 this can be
done separately.
Jeremy.
(This used to be commit 2e92418a13)
2007-10-27 20:29:36 -07:00
Jeremy Allison
f88b7a076b This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
(This used to be commit 98e154c312)
2007-10-24 14:16:54 -07:00
Jeremy Allison
9a85533914 Fix the popt / bool issues. Some places we used BOOL
where we meant int. Fix this. Thanks to metze for
pointing this out.
Jeremy.
(This used to be commit 793a9d24a1)
2007-10-19 11:38:36 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Jeremy Allison
8e54530b52 Add start of IPv6 implementation. Currently most of this is avoiding
IPv6 in winbindd, but moves most of the socket functions that were
wrongly in lib/util.c into lib/util_sock.c and provides generic
IPv4/6 independent versions of most things. Still lots of work
to do, but now I can see how I'll fix the access check code.
Nasty part that remains is the name resolution code which is
used to returning arrays of in_addr structs.
Jeremy.
(This used to be commit 3f6bd0e1ec)
2007-10-10 18:25:16 -07:00
Volker Lendecke
4a952fb0c0 r25481: Fix some typos, don't panic as non-root on net getdomainsid
Thanks to Karolin Seeger <ks@sernet.de>
(This used to be commit 5ae4b27398)
2007-10-10 12:31:07 -05:00
Michael Adam
1130482add r25197: Change net_make_ipc_connection() and net_make_ipc_connection_ex() to
return NTSTATUS to allow for better error propagation.

Michael
(This used to be commit 46093004a7)
2007-10-10 12:30:50 -05:00
Rafal Szczesniak
00737da4f4 r24853: Rename function as Jerry asked.
s/net_use_upn_machine_account/net_use_krb_machine_account/

rafal
(This used to be commit 86af9fedad)
2007-10-10 12:30:28 -05:00
Michael Adam
d051dce7b2 r24824: Create an initial talloc stackframe for the net binary.
(This used to be commit c97600b96f)
2007-10-10 12:30:25 -05:00
Rafal Szczesniak
48853f0bad r24789: Add implementation of machine-authenticated connection to netlogon
pipe used when connecting to win2k and newer domain controllers. The
server may be configured to deny anonymous netlogon connections which
would stop domain join verification step. Still, winnt domains require
such smb sessions not to be authenticated using machine credentials.
Creds employed in smb session cannot have a username in upn form, so
provide the separate function to use machine account.

rafal
(This used to be commit 30d99d8ac3)
2007-10-10 12:30:21 -05:00
Günther Deschner
7d3e5834ec r23968: Harmonize net's password prompts.
Guenther
(This used to be commit 7e2fb14d6e)
2007-10-10 12:28:50 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Michael Adam
774ceeea50 r23379: Whitespace cosmetics, to reduce irritating diffs...
Michael
(This used to be commit df30f8d5c2)
2007-10-10 12:23:11 -05:00
Volker Lendecke
a40df6f92d r22135: Check in most of Michael Adam's net conf utility. A good share of this patch
is moving functions around to fix some linker dependencies for the registry.

Michael, I've renamed your auth_utils2.c to token_utils.c.

Thanks!

Volker
(This used to be commit 9de16f25c1)
2007-10-10 12:19:16 -05:00
Volker Lendecke
f56da0890f r21831: Back out r21823 for a while, this is going into a bzr tree first.
Volker
(This used to be commit fd0ee6722d)
2007-10-10 12:18:37 -05:00
Volker Lendecke
aa6055debd r21823: Let secrets_store_machine_password() also store the account name. Not used
yet, the next step will be a secrets_fetch_machine_account() function that
also pulls the account name to be used in the appropriate places.

Volker
(This used to be commit f94e5af72e)
2007-10-10 12:18:36 -05:00
Volker Lendecke
0d91334fe7 r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes winbind
who did not run the idle events to drop ldap connections.

Volker
(This used to be commit af3308ce5a)
2007-10-10 12:18:33 -05:00
Simo Sorce
4225f9a4bd r20116: Start merging in the work done to create the new idmap subsystem.
Simo.
(This used to be commit 50cd8bffee)
2007-10-10 12:16:25 -05:00
Jeremy Allison
3da4607374 r19424: Protect against username == NULL
Jeremy.
(This used to be commit 78b14de27a)
2007-10-10 12:15:34 -05:00
Jeremy Allison
f58f146834 r19422: Doh ! Put the krb5 user@realm code in the right place.
Jeremy.
(This used to be commit a31bbbaee1)
2007-10-10 12:15:34 -05:00
Günther Deschner
9c160dd9a7 r17086: Re-add ability to contact remote domain controllers with the "net ads"
toolset.

In 3.0.23 all those commands have been limited to the DC of our primary
domain. Also distinguish calls that may go to remote DCs (search, info,
lookup, etc.) from those that should only go to our primary domain
(join, leave, etc.).

Guenther
(This used to be commit d573e64781)
2007-10-10 11:38:10 -05:00
Volker Lendecke
514af16de5 r17078: Ouch....
(This used to be commit 1d928f783a)
2007-10-10 11:38:10 -05:00
Volker Lendecke
95fd775e81 r17077: Activate RPC-SAMBA3-GETUSERNAME in the build farm
(This used to be commit 8c6088f2bd)
2007-10-10 11:38:10 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Simo Sorce
c2ff57e326 r15971: Obey the manpage description and make changesecretpw accept a password via stdin
(This used to be commit 60d4aabc32)
2007-10-10 11:17:15 -05:00
Simo Sorce
5e8221d909 r15646: Implement an setdomainsid command as well
(This used to be commit 51df47c772)
2007-10-10 11:17:05 -05:00
Gerald Carter
2c029a8b96 r15543: New implementation of 'net ads join' to be more like Windows XP.
The motivating factor is to not require more privileges for
the user account than Windows does when joining a domain.

The points of interest are

* net_ads_join() uses same rpc mechanisms as net_rpc_join()
* Enable CLDAP queries for filling in the majority of the
  ADS_STRUCT->config information
* Remove ldap_initialized() from sam/idmap_ad.c and
  libads/ldap.c
* Remove some unnecessary fields from ADS_STRUCT
* Manually set the dNSHostName and servicePrincipalName attribute
  using the machine account after the join

Thanks to Guenther and Simo for the review.

Still to do:

* Fix the userAccountControl for DES only systems
* Set the userPrincipalName in order to support things like
  'kinit -k' (although we might be able to just use the sAMAccountName
  instead)
* Re-add support for pre-creating the machine account in
  a specific OU
(This used to be commit 4c4ea7b20f)
2007-10-10 11:16:57 -05:00
Volker Lendecke
10373355df r14098: Fix Coverity # 112
(This used to be commit 121a350b92)
2007-10-10 11:11:11 -05:00
Günther Deschner
105825cf5a r13861: Avoid "net rpc join" segfaulting when storing the servername in the
affinity cache.

Guenther
(This used to be commit b8c07babbd)
2007-10-10 11:10:57 -05:00
Gerald Carter
f351b9c6eb r13382: added server affinity cache stores for 'net rpc join' and trusted domain code
(This used to be commit 9eb743584d)
2007-10-10 11:09:57 -05:00
Gerald Carter
0af1500fc0 r13316: Let the carnage begin....
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed)
2007-10-10 11:06:23 -05:00
Derrell Lipman
9c15bd311d r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
(This used to be commit f2a24de769)
2007-10-10 11:06:18 -05:00
Lars Müller
c42be9fd38 r12986: Use d_fprintf(stderr, ...) for any error message in net.
All 'usage' messages are still printed to stdout.

Fix some compiler warnings for system() calls where we didn't used the
return code.  Add appropriate error messages and return with the error
code we got from system() or NT_STATUS_UNSUCCESSFUL.
(This used to be commit f650e3bdaf)
2007-10-10 11:06:09 -05:00
Volker Lendecke
608aa3f41e r12544: Fix segfaults in winbind, smbpasswd and net
(This used to be commit 9ca8edc26e)
2007-10-10 11:05:59 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Günther Deschner
fefbaf2bca r8911: cosmetic fixes.
Guenther
(This used to be commit bf67a86114)
2007-10-10 11:00:19 -05:00
Volker Lendecke
aa3b0b190d r7998: Fix usage message
(This used to be commit 1e9a8854b1)
2007-10-10 10:58:08 -05:00
Volker Lendecke
9f4c0afa0a r6277: This implements a new caching API for enumerating the pdb elements. It is
modeled after query_displayinfo and should hide the differences between users,
groups and aliases while allowing a cache analog load_sampw_entries:

struct pdb_search *pdb_search_users(uint16 acct_flags);
struct pdb_search *pdb_search_groups(void);
struct pdb_search *pdb_search_aliases(const DOM_SID *sid);
uint32 pdb_search_entries(struct pdb_search *search, uint32 start_idx,
                          uint32 max_entries,
                          struct samr_displayentry **result);
void pdb_search_destroy(struct pdb_search *search);

Why this API? Eventually we will need to apply the work gd has started on
enumerating users with paged ldap searches to groups and aliases. Before doing
that I want to clean up the search routines we have.

The sample application (more to follow) is 'net maxrid'.

Volker
(This used to be commit 8b4f67a1e9)
2007-10-10 10:56:34 -05:00
Herb Lewis
978ca84860 r6225: get rid of warnings from my compiler about nested externs
(This used to be commit efea76ac71)
2007-10-10 10:56:30 -05:00
Volker Lendecke
b6c143a17f r5316: Get 'net afskey' into a subcommand of its own, 'net afs key'.
Implement 'net afs impersonate', generate a token for a specified user. You
obviously need to be root for this operation.

Volker
(This used to be commit 5818b092e6)
2007-10-10 10:55:37 -05:00
Günther Deschner
31dea03916 r4850: Fix remaining pdb_setsampwent-calls.
To get all entries use a 0 acb_mask.

Guenther
(This used to be commit bc729f8fd8)
2007-10-10 10:53:59 -05:00
Gerald Carter
0a2449faf5 r4848: fix build; gd please check and make sure this is ok
(This used to be commit f1d59c3a26)
2007-10-10 10:53:59 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jim McDonough
b87a0af812 r3761: Fix bug #1932: crash when non-root invokes net getlocalsid
First check to see if we can open secrets.tdb.
(This used to be commit 81e3c78d05)
2007-10-10 10:53:16 -05:00
Volker Lendecke
e66c8217f8 r2935: This is a long-standing one in my patch-queue: A pair of net commands
(usersidlist/allowedusers) to scan a file server's share and list all users
who have permission to connect there.

Volker
(This used to be commit f7f84aa1de)
2007-10-10 10:52:57 -05:00