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

37669 Commits

Author SHA1 Message Date
Volker Lendecke
1335059ff5 s3: Fix async smb handling
In cli_echo with more than one response we ended up with more than one read_smb
request. One from the call to cli_smb_req_set_pending called from
cli_smb_received. The other one from cli_smb_received itself. I don't really
see another way to deal with this than to hold the read_smb request in the
cli_state.

Metze, please check!

Volker
2011-07-27 00:47:45 +02:00
Kai Blin
c79e08fb1b s3 swat: Create random nonce in CGI mode
In CGI mode, we don't get access to the user's password, which would
reduce the hash used so far to parameters an attacker can easily guess.
To work around this, read the nonce from secrets.tdb or generate one if
it's not there.
Also populate the C_user field so we can use that for token creation.

Signed-off-by: Kai Blin <kai@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jul 26 23:33:24 CEST 2011 on sn-devel-104
2011-07-26 23:33:24 +02:00
Kai Blin
52d2ba7103 s3 swat: Add time component to XSRF token
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Kai Blin
b5d63c3c11 s3 swat: Add XSRF protection to printer page
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Kai Blin
072c199180 s3 swat: Add XSRF protection to password page
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Kai Blin
c02df79f61 s3 swat: Add XSRF protection to shares page
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Kai Blin
68f8924c7c s3 swat: Add XSRF protection to globals page
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Kai Blin
99fa6b386a s3 swat: Add XSRF protection to wizard page
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Kai Blin
ab98edd79d s3 swat: Add XSRF protection to wizard_params page
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Kai Blin
00d255fc1d s3 swat: Add XSRF protection to viewconfig page
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Kai Blin
15ed2a0eed s3 swat: Add XSRF protection to status page
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Kai Blin
c379b3623a s3 swat: Add support for anti-XSRF token 2011-07-26 22:22:25 +02:00
Kai Blin
b7521dc756 s3 swat: Allow getting the user's HTTP auth password
Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Karolin Seeger
cc86a11b9e s3-swat: Fix typo.
Thanks to Simo for reporting!

Karolin
(cherry picked from commit 9f73c1990a)
(cherry picked from commit bcb052c292)
2011-07-26 22:22:25 +02:00
Kai Blin
dc50cf38c1 s3 swat: Fix possible XSS attack (bug #8289)
Nobuhiro Tsuji of NTT DATA SECURITY CORPORATION reported a possible XSS attack
against SWAT, the Samba Web Administration Tool. The attack uses reflection to
insert arbitrary content into the "change password" page.

This patch fixes the reflection issue by not printing user-specified content on
the website anymore.

Signed-off-by: Kai Blin <kai@samba.org>
2011-07-26 22:22:25 +02:00
Jelmer Vernooij
3ce1894ff8 s3-build: Only define ldb3 when not in standalone build.
This prevents errors about it by 'make SYMBOLCHECK=1' if there is a
system ldb present.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Jul 26 18:21:48 CEST 2011 on sn-devel-104
2011-07-26 18:21:48 +02:00
Christian Ambach
749868ede4 s3:lib change default share security access mask
when there is no share SD set, the default share SD that
is used e.g. for the output of sharesec -v defaults to a
value that is not equivalent to the desired FULL access.

This is a more or less a cosmetical follow-up for the patches
in Bug #8201 that makes them more consumeable by printing
FULL (that is what the user expects) instead of a bitmask
in hexadecimal form.

previous output:
REVISION:1
OWNER:(NULL SID)
GROUP:(NULL SID)
ACL:S-1-1-0:ALLOWED/0/0x101f01ff

with patch:
REVISION:1
OWNER:(NULL SID)
GROUP:(NULL SID)
ACL:S-1-1-0:ALLOWED/0/FULL

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Tue Jul 26 15:57:55 CEST 2011 on sn-devel-104
2011-07-26 15:57:55 +02:00
Jelmer Vernooij
ac57cfda9d libsamba-util: Build in libbitmap.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Jul 26 14:45:27 CEST 2011 on sn-devel-104
2011-07-26 14:45:26 +02:00
Jelmer Vernooij
23cbfef542 cli_smb_common: Lowercase name. 2011-07-26 13:31:08 +02:00
Jelmer Vernooij
08785dd73d cli_cldap: Lowercase name. 2011-07-26 13:31:08 +02:00
Jelmer Vernooij
8a6bc7331b cli_spools: Lowercase name. 2011-07-26 13:31:08 +02:00
Volker Lendecke
aa3f10c61e s3: Fix MIT trusts
Winbind can't really cope with trusts that don't have a SID associated. This
happens with external MIT trusts for example. This filters them out when
sending the trust list from child to parent.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jul 26 11:39:53 CEST 2011 on sn-devel-104
2011-07-26 11:39:53 +02:00
Björn Baumbach
d409c0b97b s3-utils/net_rpc_printer.c: fix error message
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jul 24 19:01:47 CEST 2011 on sn-devel-104
2011-07-24 19:01:47 +02:00
Volker Lendecke
57a0f344a1 s3: Fix Coverity ID 2596, REVERSE_INULL
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul 24 16:37:19 CEST 2011 on sn-devel-104
2011-07-24 16:37:19 +02:00
Jelmer Vernooij
0397b2ef30 charset: Make name lowercase everywhere. 2011-07-23 22:08:10 +02:00
Stefan Metzmacher
824a300d2b s3:libsmb: cli_set_secdesc() only needs a const struct security_descriptor
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Jul 23 11:08:19 CEST 2011 on sn-devel-104
2011-07-23 11:08:19 +02:00
Stefan Metzmacher
6219bb9899 s3:libsmb: remove unused cli_query_secdesc_old()
metze
2011-07-23 09:55:54 +02:00
Stefan Metzmacher
baee2fbcfd s3:libsmb_xattr: make use of the new cli_query_secdesc()
metze
2011-07-23 09:55:54 +02:00
Björn Baumbach
7302277e43 s3-utils/net_rpc.c: replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:31:12 +02:00
Björn Baumbach
c436a7d812 s3-utils/net_rpc_printer.c: replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:31:07 +02:00
Björn Baumbach
eacd555f70 s3-utils/smbcacls.c: replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:31:02 +02:00
Björn Baumbach
78f267df69 s3-client/client.c: replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:30:38 +02:00
Björn Baumbach
6911b04606 s3-torture: run_nttrans_create(): replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:57 +02:00
Björn Baumbach
cb4fc92177 s3-libsmb: introduce new cli_query_secdesc() which returns NTSTATUS
Replacement for cli_query_secdesc_old()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:57 +02:00
Björn Baumbach
768646c9a2 s3-libsmb: rename cli_query_secdesc() to cli_query_secdesc_old()
Will introduce new cli_query_secdesc() function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:56 +02:00
Björn Baumbach
40e9d0c440 s3-libsmb: finally remove cli_read_old()
Replaced by new cli_read() which returns NTSTATUS instead of ssize_t.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:56 +02:00
Björn Baumbach
8bdbdd46f4 s3-libsmb/libsmb_file.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:55 +02:00
Björn Baumbach
473b16dcbf s3-torture/nbio.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:55 +02:00
Björn Baumbach
78333531de s3-torture/utable.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:55 +02:00
Björn Baumbach
ebc53c3575 s3-utils/net_rpc_printer.c: print more info on write error
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:54 +02:00
Björn Baumbach
fd7631c633 s3-utils/net_rpc_printer.c: return on read error in net_copy_file()
replace cli_read_old() with cli_read()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:46 +02:00
Björn Baumbach
4b76c108ba s3-torture/denytest.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:27 +02:00
Björn Baumbach
affc9d4b61 s3-libgpo/gpo_filesync.c: return on read error
replace cli_read_old() with cli_read()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:27 +02:00
Björn Baumbach
bffc521a8a s3-client/clitar.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:26 +02:00
Björn Baumbach
6d695749c7 s3-torture: run_oplock2(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:25 +02:00
Björn Baumbach
963aa9856c s3-torture: run_fdsesstest(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:25 +02:00
Björn Baumbach
995978ae96 s3-torture: run_fdpasstest(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:24 +02:00
Stefan Metzmacher
cfec548aa0 s3-torture: run_locktest7(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:20 +02:00
Stefan Metzmacher
4971a0a2bc s3-torture: run_locktest7(): goto fail on read error
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:10:09 +02:00
Jeremy Allison
1832c95910 Fix bug 8314] - smbd crash with unknown user.
All other auth modules code with being called with
auth_method->private_data being NULL, make the auth_server
module cope with this too.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jul 23 02:55:01 CEST 2011 on sn-devel-104
2011-07-23 02:55:01 +02:00