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

79175 Commits

Author SHA1 Message Date
Andrew Bartlett
074ee6f34c s3-rpc_server: Remove remaining code for embedded endpoint mapper
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon Mar  5 23:14:33 CET 2012 on sn-devel-104
2012-03-05 23:14:33 +01:00
Andrew Bartlett
be7bcf0e55 s3-rpc_server: Only init and register embedded RPC services in dcesrv_ep_setup()
This consults the two definitions for embedded, that is if the deamon is forking
or if the rpc_server:<interface> line is set to embedded.

Andrew Bartlett

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-03-05 21:34:25 +01:00
Volker Lendecke
cae455f688 s3: Fix a "Invalid (state->nread >= 0)" warning
Both read_from_internal_pipe and tstream_readv_pdu_queue_recv return
ssize_t.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar  5 17:38:16 CET 2012 on sn-devel-104
2012-03-05 17:38:16 +01:00
Volker Lendecke
216769f2ce s3: Move the drain_socket on error to reply_write_and_X
That's the only case where this can happen, so we should not clutter the main
code path.
2012-03-05 15:59:36 +01:00
Volker Lendecke
82b948a816 s3: Use "goto out;" in reply_write_and_X 2012-03-05 15:59:36 +01:00
Volker Lendecke
07386bb533 s3: Remove "size" param from switch_message
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar  5 15:13:49 CET 2012 on sn-devel-104
2012-03-05 15:13:49 +01:00
Volker Lendecke
c99d245548 s3: Remove "size" param from smb_dump 2012-03-05 13:35:05 +01:00
Andrew Bartlett
14d31376aa s3-lsasd: Fix debug messages on registration failure
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Mar  5 09:50:17 CET 2012 on sn-devel-104
2012-03-05 09:50:17 +01:00
Andrew Bartlett
6dbf632bc3 selftest: Reduce declarations of smbclient_auth tests by moving into a loop 2012-03-05 08:15:05 +01:00
Andrew Bartlett
fc5762388a selftest: run smbtorture_s3 tests against the ntvfs file server
This checks not only the behaviour of the NTVFS file server, but also the
client library and authentication stack.

Andrew Bartlett
2012-03-05 08:15:05 +01:00
Andrew Bartlett
4c926a708d selftest: Reduce time in cleanup loop, try waitpid on all 3 children 2012-03-05 08:15:05 +01:00
Andrew Bartlett
ebe8aa9cc1 selftest: start to run more dcerpc tests against plugin_s4_dc 2012-03-05 08:15:05 +01:00
Andrew Bartlett
0582d03efe selftest: forward rpcecho to Samba4 in plugin_s4_dc 2012-03-05 08:15:05 +01:00
Jelmer Vernooij
53a147d1c0 selftest.run: Factor out read_testlist_file and open_file_or_pipe.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Mar  5 05:42:19 CET 2012 on sn-devel-104
2012-03-05 05:42:19 +01:00
Jelmer Vernooij
f26b40a925 selftest.run: Factor out exported_envvars_str. 2012-03-05 03:49:50 +01:00
Jelmer Vernooij
a6a8456646 selfclient.client: Factor out write_clientconf. 2012-03-05 03:45:57 +01:00
Jelmer Vernooij
f3f6b8eafa selftest.run: Factor out expand_command_run. 2012-03-05 03:39:57 +01:00
Jelmer Vernooij
d6924f8039 selftest.run: Factor out expand_command_list. 2012-03-05 03:27:40 +01:00
Jelmer Vernooij
1741e6486d selftest: Factor out expand_environment_strings. 2012-03-05 03:20:13 +01:00
Amitay Isaacs
5c5111ca03 s3-ctdb: Enable CTDB readonly support only if CTDB supports it
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Mar  5 02:47:36 CET 2012 on sn-devel-104
2012-03-05 02:47:36 +01:00
Rusty Russell
5bda068773 dbwrap_ctdb: only fetch a read-only copy if we had a record already.
Because revoking read-only copies of records is expensive, we only
want ctdbd to do it for high-turnover records.  A basic heuristic is
that if we don't find a local copy of the record, don't ask for a
read-only copy.

The fetch itself will cause ctdbd to migrate the record, so eventually
we will have a local copy.  Next time it gets migrated away, we'll
call ctdbd_fetch() with local_copy = true.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-05 01:11:26 +01:00
Rusty Russell
67bb5abe81 ctdbd_conn: fetch read-only copies of records.
This means we try to get a read-only copy of a record, which we can
then place in the local tdb.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-05 01:11:26 +01:00
Rusty Russell
a3e6f55065 dbwrap_ctdb: handle read-only records.
The new read-only record flags make determining if we can use a record
a bit more complex, so extract it into its own function.

The OLD logic was:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it.

The new logic is:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it IF we only
   want read-only access, OR there are no read-only delegations.
3) If we are not dmaster, we can only use it if we want read-only
   access and it is marked as a read-only copy.

This logic is unused until the next patches which begin to ask
for read-only copies of records.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-05 01:11:26 +01:00
Andrew Bartlett
c23b2bdea1 selftest: remove unused config.h check
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Mar  5 01:10:01 CET 2012 on sn-devel-104
2012-03-05 01:10:01 +01:00
Andrew Bartlett
2c7d77c77f s3-smbd: vuser and session_info cannot be NULL here
The callers always supply it. (this is a hold-over from the
security=share removal).

Andrew Bartlett
2012-03-04 23:33:05 +01:00
Andrew Bartlett
8b99c83d2f s3-rpc_server: consolidate rpc server init routines
This uses a helper function to reduce duplication.

Andrew Bartlett
2012-03-04 23:33:05 +01:00
Andrew Bartlett
50de3cf9c0 s3-auth Add make_session_info_from_pw to avoid multiple getpwnam() calls 2012-03-04 23:33:05 +01:00
Andrew Bartlett
d7bb961859 s3-auth: Remove security=share (depricated since 3.6).
This patch removes security=share, which Samba implemented by matching
the per-share password provided by the client in the Tree Connect with
a selection of usernames supplied by the client, the smb.conf or
guessed from the environment.

The rationale for the removal is that for the bulk of security=share
users, we just we need a very simple way to run a 'trust the network'
Samba server, where users mark shares as guest ok.  This is still
supported, and the smb.conf options are documented at
https://wiki.samba.org/index.php/Public_Samba_Server

At the same time, this closes the door on one of the most arcane areas
of Samba authentication.

Naturally, full user-name/password authentication remain available in
security=user and above.

This includes documentation updates for username and only user, which
now only do a small amount of what they used to do.

Andrew Bartlett

                       --------------
                      /              \
                     /      REST      \
                    /        IN        \
                   /       PEACE        \
                  /                      \
                  |      SEC_SHARE       |
                  |    security=share    |
                  |                      |
                  |                      |
                  |       5 March        |
                  |                      |
                  |        2012          |
                 *|     *  *  *          | *
        _________)/\\_//(\/(/\)/\//\/\///|_)_______
2012-03-04 23:33:05 +01:00
Stefan Metzmacher
acfa107ec6 s3:smbd/globals.h: remove unused pollfd pointer
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Mar  4 23:18:10 CET 2012 on sn-devel-104
2012-03-04 23:18:10 +01:00
Jelmer Vernooij
c9d380702c selftest.py: Use testtools TestCase class.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Mar  4 19:38:25 CET 2012 on sn-devel-104
2012-03-04 19:38:25 +01:00
Jelmer Vernooij
82af4a79b9 selftest.py: Add dummy init file (required to run tests). 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
e7d6d67bee selftest.pl: Remove unused --verbose option. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
01ba5cf689 selftest.py: Remove unused --verbose option. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
8ae7615cf3 selftest.py: Remove unused code, reconcile signal handlers. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
b5d9cd1740 selftest.py: Fix handling of boolean options. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
aaa7cf67ab selftest.py: Fix signal handling. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
570dbf2ee0 Run selftest.py tests. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
7e5d98c22c selftest: Now runs again for tests that use environment 'none'. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
3a6e4cf2b1 selftest.target: Add NoneTarget. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
cd9cf47972 selftest.py: Finish conversion to python - now loads without syntax errors. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
11c7ce35c0 selftest.testlist: Add RestrictedTestManager.from_path. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
48155d189a selftest: More work on conversion to Python. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
d400619dee selftest.testlist: Add docstrings. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
a50def839c selftest.testlist: Add manager for restricted test lists. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
616139c01e Add TestListFilter definition. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
4802561d69 selftest.testlist: Add read_testlist. 2012-03-04 18:02:06 +01:00
Jelmer Vernooij
7a614ac710 selftest.testlist: Add read_test_regexes. 2012-03-04 18:02:06 +01:00
Jelmer Vernooij
8b583dc64c selftest: Add testlist management module. 2012-03-04 18:02:06 +01:00
Jelmer Vernooij
4d602fb05d selftest.target: Add Environment.get_vars. 2012-03-04 18:02:06 +01:00
Jelmer Vernooij
646f6b2697 selftest: Add tests for trying to reuse an environment that has gone down. 2012-03-04 18:02:06 +01:00