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

53592 Commits

Author SHA1 Message Date
Stefan Metzmacher
d23a1935e8 s3:param: add PROTOCOL_SMB2
metze
2009-05-20 15:42:19 +02:00
Stefan Metzmacher
d59f84d738 SMB2-LOCK: let the test pass against samba4
metze
2009-05-20 15:26:54 +02:00
Volker Lendecke
54973d0422 Fix bug disclosed by lock8 torture test
We have to drop the gpfs level share modes, regardless of whether we put
the file into the pending close queue.
2009-05-20 15:15:57 +02:00
Volker Lendecke
3fbc871f70 Demonstrate a bug we have when dealing with real os-level share modes
Another one of those where you stare at logfiles for hours, and when you found
it, it's absolutely obvious what is happening...
2009-05-20 14:58:37 +02:00
Günther Deschner
9a13af9a99 s4: try to fix privileges implementation in order to pass the RPC-SAMR-USERS-PRIVILEGES test.
Guenther
2009-05-20 13:35:05 +02:00
Sam Liddicott
4b21ad9db7 Have ntvfs_connect() accept union smb_tcon *tcon instead of char* sharename
This change brings ntvfs_connect into compliance with other ntvfs functions
which take an ntvfs module, an ntvfs request and an smb io union.

It now becomes the responsibility of ntvfs modules to examine
tcon->generic.level themselves and derive the share name and any other
options
directly; e.g.

	const char *sharename;

	switch (tcon->generic.level) {
	case RAW_TCON_TCON:
		sharename = tcon->tcon.in.service;
		break;
	case RAW_TCON_TCONX:
		sharename = tcon->tconx.in.path;
		break;
	case RAW_TCON_SMB2:
	default:
		return NT_STATUS_INVALID_LEVEL;
	}

	if (strncmp(sharename, "\\\\", 2) == 0) {
		char *p = strchr(sharename+2, '\\');
		if (p) {
			sharename = p + 1;
		}
	}

service.c smbsrv_tcon_backend() is called before ntvfs_connect and fills in
some of the tcon->..out values.
For the case of RAW_TCON_TCONX, it filles out tcon->tconx.out.tid and
tcon->tconx.out.options

For the case of RAW_TCON_TCON it fills out tcon->tcon.out.tid and
tcon->tcon.out.max_xmit

Thus the ntvfs_connect function for vfs modules may override these values
if desired, but are not required to.

ntvfs_connect functions are required to fill in the tcon->tconx.out.*_type
fields, for RAW_TCON_TCONX, perhaps something like:

	if (tcon->generic.level == RAW_TCON_TCONX) {
		tcon->tconx.out.fs_type = ntvfs->ctx->fs_type;
		tcon->tconx.out.dev_type = ntvfs->ctx->dev_type;
	}

Signed-off-by: Sam Liddicott <sam@liddicott.com>

(I fixed the ntvfs_connect() in the smb_server/smb2/
 and the RAW_TCON_SMB2 switch case in the modules)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-05-20 13:32:27 +02:00
Günther Deschner
e11f9b46c6 s3-selftest: add add and delete group scripts using nss_wrapper.
Guenther
2009-05-20 12:37:44 +02:00
Günther Deschner
3bd360c73d nsswrapper: implement group_del() in nss_wrapper.pl.
Guenther
2009-05-20 12:37:37 +02:00
Günther Deschner
b3cc01fd68 nsswrapper: implement group_add() in nss_wrapper.pl.
Guenther
2009-05-20 12:37:31 +02:00
Sam Liddicott
8cd9c72d75 s4:smb_server: initialy read the first 4 bytes only
Stop packet_recv getting greedy and reading the whole socket
and then dispatching te extra packets in a timer loop

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-05-20 10:16:43 +02:00
Stefan Metzmacher
ac7f4fa380 s4:libcli/raw: initialy read the first 4 bytes only
metze
2009-05-20 10:16:42 +02:00
Volker Lendecke
e3b5e286d0 Do not do a merged build without shared libs
Jelmer, you might want to take a look at Andrew B's problem with

--enable-developer --disable-shared --disable-shared-libs
2009-05-20 08:59:27 +02:00
Volker Lendecke
8811aa1376 Only build the krb5 locator when building shared libs 2009-05-20 08:41:57 +02:00
Volker Lendecke
ac65ae9b1d Set errno=ENOMEM if tevent_add_fd fails
tevent_add_fd does not properly set that. At least in epoll and select this is
the only error condition.

Metze, please check!
2009-05-19 23:51:22 +02:00
Jeremy Allison
f8da7f5d74 Added mapping table for account object in lsa.
Jeremy.
2009-05-19 14:47:25 -07:00
Volker Lendecke
f9d00fb58e Simplify the logic of tsocket_bsd_pending
Remove two indentation levels by returning early on error.

Metze, please check!
2009-05-19 23:35:16 +02:00
Jelmer Vernooij
cf9636ea99 tevent/python: Makefile was still trying to build some non AC_SUBST python targets
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
2009-05-19 23:33:00 +02:00
Volker Lendecke
ae386415b6 Make local-wbclient flexible in # of connections and ops 2009-05-19 23:09:26 +02:00
Volker Lendecke
15424162ca Fix wb_trans_done after conversion to unix calling conventions 2009-05-19 23:09:26 +02:00
Volker Lendecke
f1c093c89f Fix an uninitialized variable in wb_context_init 2009-05-19 23:09:26 +02:00
Volker Lendecke
05870b7ee7 Another attempt at fixing the static build of vfs_notify_fam 2009-05-19 20:46:52 +02:00
Volker Lendecke
3e1b6487e7 Fix detection of "enum FAMCodes" 2009-05-19 20:46:52 +02:00
Aravind Srinivasan
bb454b5fd9 s3 onefs: Removing an incorrect TALLOC_FREE
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-19 10:01:15 -07:00
Volker Lendecke
77819597f3 Use TDB_VOLATILE instead of tdb_set_max_dead() 2009-05-19 14:54:53 +02:00
Karolin Seeger
f741b90ee8 s3/docs: Fix shutdown script example.
This fixes bug #5897. Thanks to TAKAHASHI Motonobu
<monyo [at] samba.gr.jp> for reporting and providing the example!

Karolin
2009-05-19 13:42:16 +02:00
Aravind Srinivasan
1718e803dc s3: Always allocate memory in dptr_ReadDirName
This is a follow up to 69d61453df to
adjust the API to allow the lower layers allocate memory.  Now the
memory can explicitly be freed rather than relying on talloc_tos().

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-18 21:50:07 -07:00
Tim Prouty
d38e5d18a7 s4 torture: Fix typo 2009-05-18 18:31:46 -07:00
Tim Prouty
c3bc833140 s3 sendfile: Fix two bugs in sendfile
These were found interally via code inspection.

1) fake_sendfile was incorrectly writing zeros over real data on a
   short read.

2) sendfile_short_send was doing 4 byte writes instead of 1024 byte
   writes due to an incorrect sizeof usage.

Jermey, Vl please check
2009-05-18 18:31:02 -07:00
Günther Deschner
5186661023 s4-smbtorture: Fix build warning in RPC-SAMR tests.
Guenther
2009-05-19 02:05:25 +02:00
Günther Deschner
d7142fb1b5 s3: re-run make samba3-idl.
Guenther
2009-05-19 02:05:18 +02:00
Günther Deschner
7c22eed419 lsa: add access_masks for accounts, secrets and trusted domains to IDL.
Guenther
2009-05-19 02:05:10 +02:00
Jeremy Allison
459dc8f39c Change access_check_samr_object -> access_check_object.
Make map_max_allowed_access global. Change lsa_get_generic_sd
to add Everyone:LSA_POLICY_READ|LSA_POLICY_EXECUTE, not just
LSA_POLICY_EXECUTE.
Jeremy.
2009-05-18 15:44:03 -07:00
Günther Deschner
d06051cc51 s3-lsa: let _lsa_OpenPolicy() just call _lsa_OpenPolicy2().
Guenther
2009-05-19 00:16:26 +02:00
Günther Deschner
9e741b34b2 s3-selftest: enable RPC-SAMR-USERS-PRIVILEGES.
Guenther
2009-05-18 23:36:57 +02:00
Jeremy Allison
ada1af41ea Fix SAMR server for winbindd access. Ensure we allow
MAX_ACCESS to be mapped to what we're giving Everyone.
Jeremy.
2009-05-18 14:26:37 -07:00
Günther Deschner
6ab0c83570 s3-lsa: let _lsa_GetSystemAccessAccount() call into _lsa_EnumPrivsAccount().
Inspired by lsa server from Samba 4.

Just removing a user in SAMR does not remove a user in LSA. If you use
usermanager from windows, the "User Rights" management gui gets unaccessable as
soon as you delete a user that had privileges granted. With this fix, that
no longer existing user would properly appear as an unknown account in the GUI
(as it does while using usermanager with windows domains).

This almost makes Samba3 pass the RPC-SAMR-USERS-PRIVILEGES test.

Guenther
2009-05-18 23:08:13 +02:00
Günther Deschner
4724fef897 s3-lsa: start a very basic implementation of _lsa_DeleteObject().
Certainly not the full story but this gets us closer to pass the
RPC-SAMR-USERS-PRIVILEGES test.

Guenther
2009-05-18 22:58:31 +02:00
Günther Deschner
0a9049be87 s4-smbtorture: add RPC-SAMR-USERS-PRIVILEGES test.
This test demonstrates the independence of the lsa and samr accounts while
remove a samr users that still has privileges granted.

Guenther
2009-05-18 22:54:14 +02:00
Volker Lendecke
5fb3b8e377 Move down the become_root()/unbecome_root() calls into the VFS modules
The aio_fork module does not need this, as it does not communicate via signals
but with pipes. Watching a strace log with those become_root() calls in aio.c
is absolutely awful, and it does affect performance.
2009-05-18 13:38:56 +02:00
Volker Lendecke
bbbf9f13ad Fix bug 5681: Do not limit the number of network interfaces
Jeremy as far as I can see there is no real technical reason to limit the
number of interfaces. If you like this patch, can you please merge it to 3.4?
If you don't please tell me :-)

Thanks,

Volker
2009-05-18 13:38:55 +02:00
Volker Lendecke
67a2e62991 In aio_fork, we have to close all fd's, we might hold a gpfs share mode
Keeping such an fd open prohibits another open of that same file.
2009-05-18 10:42:22 +02:00
Volker Lendecke
22085c59cb Add "file_walk_table" to do stuff with all open files 2009-05-18 10:42:22 +02:00
Volker Lendecke
8b9c5f0483 Fix a race condition in vfs_aio_fork with gpfs share modes 2009-05-18 10:42:22 +02:00
Volker Lendecke
f140bf2e65 Fix broken pipe handling
Metze is right: If we have *any* error at the socket level, we just can
not continue.

Also, apply some defensive programming: With this async stuff someone else
might already have closed the socket.
2009-05-18 07:13:04 +02:00
Volker Lendecke
795b896ab0 Fix a type-punned warning 2009-05-18 07:13:04 +02:00
Bo Yang
aa70e44cd0 s3: tevent_req_poll() loops forever when pipe is broken
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-19 01:13:36 +08:00
Michael Adam
2722dd357c s3:fix bug #6371, unsuccessful net conf setparm leaves empty share
Wrap creation of share and setting of parameter into a transaction.

Michael
2009-05-17 22:19:24 +02:00
Volker Lendecke
834fc3786e s3-events: Not only timed, also immediate events generate a timeout return 2009-05-17 11:45:22 +02:00
Simo Sorce
4112bb2428 Move smb_create_user() in samsync
It is not used anywhere else, so make it also static and remove
it from proto.h
2009-05-16 15:30:48 -04:00
Jelmer Vernooij
72b744f38e tevent: Define TALLOC_FREE() if it's not defined yet, to allow building
with released versions of talloc.
2009-05-16 20:31:59 +02:00