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

208 Commits

Author SHA1 Message Date
Jeremy Allison
b3630b4739 Fix bug 7866 - "net" in v3-6-test broken.
Someone wasn't careful about testing when not running as root :-).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Dec 15 20:45:25 CET 2010 on sn-devel-104
2010-12-15 20:45:25 +01:00
Andrew Bartlett
cf4de8ec2c s3-debug Remove 'AllowDebugChange' and use lp_set_cmdline() instead
By removing this global variable, the API between the two different
debug systems is made more similar.  Both s3 and s4 now have
lp_set_cmdline() which ensures that the smb.conf cannot overwrite
these the user-specified log level.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
9da4ace1d9 s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
ffdfcfb514 s3-dsgetdcname: always pass in messaging context.
Volker, please check.

Guenther
2010-09-23 10:26:25 -07:00
Günther Deschner
002ac5681f s3-net: only include netapi header when needed.
Guenther
2010-08-06 15:43:38 +02:00
Andreas Schneider
ce2a086119 s3-popt: Only include popt-common.h when needed. 2010-08-05 12:08:31 +02:00
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Günther Deschner
9bbf761bfe s3-net: Added a rather trivial "net printing dump" command.
Guenther
2010-05-18 15:06:17 +02:00
Volker Lendecke
89c785c47a s3: Fix a long-standing problem with recycled PIDs
When a samba server process dies hard, it has no chance to clean up its entries
in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb.

For locking.tdb and brlock.tdb Samba is robust by checking every time we read
an entry from the database if the corresponding process still exists. If it
does not exist anymore, the entry is deleted. This is not 100% failsafe though:
On systems with a limited PID space there is a non-zero chance that between the
smbd's death and the fresh access, the PID is recycled by another long-running
process. This renders all files that had been locked by the killed smbd
potentially unusable until the new process also dies.

This patch is supposed to fix the problem the following way: Every process ID
in every database is augmented by a random 64-bit number that is stored in a
serverid.tdb. Whenever we need to check if a process still exists we know its
PID and the 64-bit number. We look up the PID in serverid.tdb and compare the
64-bit number. If it's the same, the process still is a valid smbd holding the
lock. If it is different, a new smbd has taken over.

I believe this is safe against an smbd that has died hard and the PID has been
taken over by a non-samba process. This process would not have registered
itself with a fresh 64-bit number in serverid.tdb, so the old one still exists
in serverid.tdb. We protect against this case by the parent smbd taking care of
deregistering PIDs from serverid.tdb and the fact that serverid.tdb is
CLEAR_IF_FIRST.

CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not
work when all smbds are restarted. For this, "net serverid wipe" has to be run
before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up
sessionid.tdb and connections.tdb.

While there, this also cleans up overloading connections.tdb with all the
process entries just for messaging_send_all().

Volker
2010-03-10 16:07:10 +01:00
Karolin Seeger
340797f3fa Fix typo in comments. 2010-03-03 16:03:13 +01:00
Volker Lendecke
4c1c3f2549 s3: Implement global locks in a g_lock tdb
This is the basis to implement global locks in ctdb without depending on a
shared file system. The initial goal is to make ctdb persistent transactions
deterministic without too many timeouts.
2010-02-12 23:12:09 +01:00
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