1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-30 13:18:05 +03:00
Commit Graph

38007 Commits

Author SHA1 Message Date
Michael Adam
d29be7d263 s3: use lp_load_global() in smbw_sample -- whatever this is ... :-) 2011-07-28 11:17:40 +02:00
Michael Adam
b9fdfbad2e s3:smbtree: use lp_load_global() 2011-07-28 11:17:40 +02:00
Michael Adam
7e2deb94dc s3:smbpasswd: use lp_load_global() 2011-07-28 11:17:40 +02:00
Michael Adam
039ae12dbb s3:smbfilter: use lp_load_global() 2011-07-28 11:17:39 +02:00
Michael Adam
e6176d597a s3:smbcquotas: use lp_load_global() 2011-07-28 11:17:39 +02:00
Michael Adam
ce8beb5133 s3:smbcontrol: use lp_load_global(): smbcontrol does not need to load the shares 2011-07-28 11:17:38 +02:00
Michael Adam
b608cfc8ec s3:smbcacls: use lp_load_global() 2011-07-28 11:17:38 +02:00
Michael Adam
d4abfcc04b s3:pdbedit: use lp_load_global() 2011-07-28 11:17:38 +02:00
Michael Adam
2a98ee0f83 s3:ntlm_auth: use lp_load_global() 2011-07-28 11:17:37 +02:00
Michael Adam
ac9a61bda8 s3:nmblookup: use lp_load_global() 2011-07-28 11:17:37 +02:00
Michael Adam
82202f99b3 s3:net: use lp_load_global() 2011-07-28 11:17:36 +02:00
Michael Adam
7557ba1eb2 s3:eventlogadm: use lp_load_global() 2011-07-28 11:17:36 +02:00
Michael Adam
1679fe5ca9 s3:dbwrap_torture: use lp_load_global() 2011-07-28 11:17:35 +02:00
Michael Adam
59a2f3d707 s3:dbwrap_tool: use lp_load_global() 2011-07-28 11:17:35 +02:00
Michael Adam
ae752ec3a5 s3:smbtorture: use the lp_load_global() wrapper of lp_load() 2011-07-28 11:17:35 +02:00
Michael Adam
c32479f584 s3:torture: use lp_load_global() in the strstr test 2011-07-28 11:17:34 +02:00
Michael Adam
ecc487e026 s3:torture: use lp_load_global in the strcmp test 2011-07-28 11:17:34 +02:00
Michael Adam
426ae350ee s3:torture: use lp_load_global() in the push_ucs2 test 2011-07-28 11:17:33 +02:00
Michael Adam
bfde6fa535 s3:torture: use lp_load_global() in the msgtest 2011-07-28 11:17:33 +02:00
Michael Adam
d6b4c693be s3:torture: use lp_load_global() in the masktest 2011-07-28 11:17:33 +02:00
Michael Adam
ee495ab5c3 s3:torture: use lp_load_global() in locktest2 2011-07-28 11:17:32 +02:00
Michael Adam
407a514f8b s3:torture: use lp_load_global() in the locktest 2011-07-28 11:17:32 +02:00
Michael Adam
4a21e50474 s3:rpcclient: use the lp_load_global() wrapper of lp_load() 2011-07-28 11:17:31 +02:00
Michael Adam
a7e9219002 s3:nmbd: use the lp_load_global() wrapper of lp_load() 2011-07-28 11:17:31 +02:00
Michael Adam
74b806c888 s3:libnet_join: use lp_load_global() wrapper of lp_load() 2011-07-28 11:17:31 +02:00
Michael Adam
88ee6973f0 s3:libsmbconf: use lp_load_global() in the testsuite 2011-07-28 11:17:30 +02:00
Michael Adam
2c3a1f44fa s3:libnetapi: use lp_load_global() 2011-07-28 11:17:30 +02:00
Michael Adam
c2aa8e5d63 s3:loadparm: make lp_set_in_client() static - only used in wrappers in loadparm now. 2011-07-28 11:17:29 +02:00
Michael Adam
c9efe307cb s3:pam_smbpass: use lp_load_client() in pam_smbpass 2011-07-28 11:17:29 +02:00
Michael Adam
f764de64e3 s3:libsmb: use lp_load_client() and lp_load_client_no_reinit() in libsmb_context 2011-07-28 11:17:29 +02:00
Michael Adam
4e41d38df3 s3:loadparm: add wrapper lp_load_client_no_reinit() 2011-07-28 11:17:28 +02:00
Michael Adam
5676fbb399 s3:loadparm: add wrapper lp_load_globals_no_reinit() 2011-07-28 11:17:28 +02:00
Michael Adam
fbf254c19a s3:libsmb: fix a call to lp_load to reinit the globals in any case
The potential previous lp_load of $HOME/.smb/smb.conf might have failed
halfway through and might have left globals initialized in an unwanted state.
So we should make sure to clean up before loading the dyn_CONFIGFILE()
2011-07-28 11:17:27 +02:00
Michael Adam
bff217cf4a s3:smbspool: use lp_load_client() 2011-07-28 11:17:27 +02:00
Michael Adam
0c55a7606f s3:smbclient: use lp_load_client() 2011-07-28 11:17:27 +02:00
Michael Adam
0b21c7750f s3:loadparm: make lp_is_in_client() static - only used inside loadparm 2011-07-28 11:17:26 +02:00
Michael Adam
37f548d788 s3:loadparm: add lp_load_client() that also sets the client state internally 2011-07-28 11:17:26 +02:00
Michael Adam
1379ef8b7b s3:loadparm: add a convenience wrapper lp_load_global()
This is the use case for most callers, especially the client tools.
2011-07-28 11:17:25 +02:00
Michael Adam
13329112e9 s3:loadparm: rename parameter "allow_registry_shares" to "load_all_shares" 2011-07-28 11:17:25 +02:00
Andrew Tridgell
356a2cc0b0 s3-waf: the passdb subsystem needs to be called pdb
the 'pdb' name is builtin to the passdb module loading code as a fixed
string. We need to call the subsystem pdb so that external passdb
modules end up in bin/modules/pdb/ where they can be found by the
Samba3 module loader

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-28 15:20:51 +10:00
Jeremy Allison
d82256ca11 Use existing ISDOT and ISDOTDOT macros.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jul 28 02:09:20 CEST 2011 on sn-devel-104
2011-07-28 02:09:20 +02:00
Volker Lendecke
94a2328367 s3: Avoid calls to cli_dos/nt_error in torture
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jul 27 23:07:51 CEST 2011 on sn-devel-104
2011-07-27 23:07:50 +02:00
Volker Lendecke
a7f8d9e798 s3: Fix formatting in check_error() 2011-07-27 21:55:21 +02:00
Stefan Metzmacher
34faeb8bba s3:test_async_echo: unsure the desired smb message sequence
We want to start sending echo requests once the rpc related
smb operation arrived the smb layer.

metze
2011-07-27 21:55:21 +02:00
Christian Ambach
abf3573c21 s3:modules fix Bug 8330 NFSv4 ACL merging logic is broken
we should not merge ACEs with different flags (e.g. CI/OI/I/)
Otherwise ACLs get wrong entries and thus wrong semantics

Example:
ACL:BUILTIN\Users:ALLOWED/0x0/FULL
ACL:BUILTIN\Users:ALLOWED/I/READ
got merged to
ACL:BUILTIN\Users:ALLOWED/I/FULL

This is not the same and also leads to wrong displays
in the Windows ACL dialog

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Wed Jul 27 16:03:51 CEST 2011 on sn-devel-104
2011-07-27 16:03:51 +02:00
Andreas Schneider
133fb0ebcc s3-spoolss: Use get_session_info_system().
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Jul 27 10:38:34 CEST 2011 on sn-devel-104
2011-07-27 10:38:34 +02:00
Andreas Schneider
b77f626def s3-spoolss: Free the info2 structure in _spoolss_GetPrinter. 2011-07-27 08:50:01 +02:00
Andreas Schneider
f26441d8ba s3-spoolss: Use tmp_ctx everywhere in _spoolss_DeletePrinterDriverEx. 2011-07-27 08:50:01 +02:00
Andreas Schneider
fea4a3111b s3-spoolss: Use tmp_ctx in winreg_enum_printer_key_internal. 2011-07-27 08:50:01 +02:00
Andreas Schneider
c58c0ba0bd s3-spoolss: Use tmp_ctx in winreg_printer_deleteform1_internal. 2011-07-27 08:50:01 +02:00
Andreas Schneider
80c1a8e04e s3-spoolss: Use tmp_ctx in winreg_printer_setform1_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
baccb06658 s3-spoolss: Use tmp_ctx in winreg_printer_addform1_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
a6ea1542c5 s3-spoolss: Use tmp_ctx in winreg_printer_getform1_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
f49917ade0 s3-spoolss: Use tmp_ctx in winreg_printer_enumforms1_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
81eae6ebd4 s3-spoolss: Use tmp_ctx in winreg_set_printer_secdesc_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
41c2e711bd s3-spoolss: Use tmp_ctx in winreg_get_printer_secdesc_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
022a13f1e0 s3-spoolss: Use tmp_ctx in winreg_add_driver_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
ff6294ef0f s3-spoolss: Use tmp_ctx in winreg_del_driver_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
72ac68e746 s3-spoolss: Use tmp_ctx in winreg_get_driver_list_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
2e2631f554 s3-spoolss: Use tmp_ctx in winreg_get_driver_internal. 2011-07-27 08:50:00 +02:00
Andreas Schneider
106829545c s3-spoolss: Use tmp_ctx in winreg_delete_printer_dataex_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
e6e80ea137 s3-spoolss: Use tmp_ctx in winreg_get_printer_dataex_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
7aef2f6308 s3-spoolss: Use tmp_ctx in winreg_enum_printer_dataex_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
311d6dbeb7 s3-spoolss: Use tmp_ctx in winreg_set_printer_dataex_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
2b0adab76e s3-spoolss: Use tmp_ctx in winreg_update_printer_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
34dc5a57f9 s3-spoolss: Use tmp_ctx in winreg_create_printer_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
f9359a2dc9 s3-spoolss: Use tmp_ctx in winreg_get_printer_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
20afdeec3c s3-spoolss: Use tmp_ctx in winreg_printer_get_changeid_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
ba74c5df2d s3-spoolss: Use tmp_ctx in winreg_printer_update_changeid_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
43604dd321 s3-spoolss: Use tmp_ctx in winreg_delete_printer_key_internal. 2011-07-27 08:49:59 +02:00
Andreas Schneider
bed0672b03 s3-spoolss: Free local in winreg_printer_binding_handle. 2011-07-27 08:49:58 +02:00
Simo Sorce
99e03bee7a s3-spoolss: Improve memory efficiency.
p->mem_ctx is a relatively long lived context as it will not be freed until
a full request is served. In spoolss we do a lot of operations including
opening new pipes to connect to winreg.
Use more shortlived temporary contexts to avoid leaking a lot of memory on
p->mem_ctx and carrying it around untill all the operations in the current call
are done.

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-07-27 08:49:58 +02:00
Andreas Schneider
8831402596 s3-rpc_client: Fix memory context in winreg_enum_printer_dataex(). 2011-07-27 08:49:58 +02:00
Andreas Schneider
5045281e17 s3-rpc_client: Close policy handles before creating defaults.
We reopen the hive and key so close them before reopen.
2011-07-27 08:49:58 +02:00
Andreas Schneider
f8afaa76f2 s3-rpc_client: Close the hive handle before we open it again. 2011-07-27 08:49:58 +02:00
Andreas Schneider
a0597b75e6 s3-rpc_client: Close hive if opening of the key fails. 2011-07-27 08:49:58 +02:00
Andreas Schneider
fe7e4ac462 s3-rpc_server: Copy correct local tsocket address. 2011-07-27 08:49:58 +02:00
Michael Adam
3276060da4 s3:idmap_tdb2: remove the undocumented option of the silly name "tdb:idmap2.tdb"
In ancient times, when ctdb had not support for persistent databases and
tdb2 was introduced as a two-layer solution and it was more important than
today to be able to change the location of the permanent database file
because it had to reside on shared storage.

But these were times when idmap_tdb2 was not even officially released.
Nowadays, with ctdb handling the persistent idmap2.tdb database, the path
is stripped anyways, so this undocumented option has become unnecessary
and is hence removed.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Jul 27 05:37:57 CEST 2011 on sn-devel-104
2011-07-27 05:37:57 +02:00
Michael Adam
67cd2f9d86 s3:idmap_tdb2: remove a legacy comment 2011-07-27 04:29:05 +02:00
Michael Adam
4b5ada3d27 s3:idmap_tdb2: remove legacy comment 2011-07-27 04:29:05 +02:00
Michael Adam
5511855738 s3:idmap_tdb2: remove superfluous initialization with bogus comment 2011-07-27 04:29:05 +02:00
Michael Adam
7d3dc2164b s3:idmap_tdb2: fix a legacy comment that does not apply any more 2011-07-27 04:29:05 +02:00
Michael Adam
b6c82f18f1 s3:idmap_tdb2: deprecate the idmap:script parameter and use "idmap config * : script" instead
With this patch, "idmap config * : script" will override "idmap : script".
If "idmap : script" is present, a deprecation warning will be printed in any
case. If "idmap config * : script" is not set, then the value of "idmap :script"
will be used for backwards compatibility.
2011-07-27 04:29:05 +02:00
Jeremy Allison
4fdad1960c Fix bug #8324 - smbclient cannot list directories from a big-endian machine.
Two uses of the setup array are not being correctly byte-swapped to little
endian.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jul 27 03:14:48 CEST 2011 on sn-devel-104
2011-07-27 03:14:48 +02:00
Volker Lendecke
61d420e0d8 s3: cli_close_done->write_andx_done in test_async_echo
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jul 27 02:03:49 CEST 2011 on sn-devel-104
2011-07-27 02:03:49 +02:00
Volker Lendecke
cdae9ef267 s3: Fix a debug message 2011-07-27 00:47:45 +02:00
Volker Lendecke
45ec7d6f24 s3: Fix formatting 2011-07-27 00:47:45 +02:00
Volker Lendecke
9f66e302b8 s3: Fix an error message 2011-07-27 00:47:45 +02:00
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
Stefan Metzmacher
6d4f9fc251 s3:libsmb: move cli_state->desthost to cli_state->conn.remote_name
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul 22 18:17:41 CEST 2011 on sn-devel-104
2011-07-22 18:17:41 +02:00
Stefan Metzmacher
477a8a7e47 s3:winbindd_cm: use controller instead of cli->desthost
The should have the same value.

metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
e0a38c3a36 s3:net_util: use server_name instead of cli->desthost
They should be the same.

metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
4fb03b4edd s3:net_rpc_registry: use pipe_hnd->desthost instead of cli->desthost
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
1f1ca59a04 s3:net_rpc_printer: make use of cli_state_remote_name()
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
419eb293f7 s3:net_rpc_join: make use of cli_state_remote_name()
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
7ca20eadf4 s3:net_rpc_join: use pipe_hnd->desthost instead of cli->desthost
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
27c38dfb44 s3:net_rpc: make use of cli_state_remote_name()
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
f88723ab27 s3:net_rpc: use netr->desthost instead of cli->desthost
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
3d675f1219 s3:net_rap: make use of cli_state_remote_name()
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
540cd1ac96 s3:rpcclient: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
9a638c4c5a s3:rpcclient: use rpc_pipe->desthost instead of cli->desthost
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
49c8534ae4 s3:cli_pipe_schannel: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
efc2c3159e s3:cli_pipe: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
ef23fb3412 s3:cli_pipe: use result->desthost instead of cli->desthost
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
9fe30f3c91 s3:libsmb_server: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
b5e9ada632 s3:libsmb/libsmb_dir: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
8277260ae7 s3:libsmb/clirap2: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
390b54554c s3:libsmb/clifsinfo: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
ad40515d17 s3:libsmb/clidfs: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
77fdebc5e5 s3:libsmb/cliconnect: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
22cbb59c37 s3:libnet_join: make use of cli_state_remote_name() 2011-07-22 17:06:09 +02:00
Stefan Metzmacher
bb0d063f01 s3:lib/netapi: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
9a3e15df7e s3:client: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
ab9d99cece s3:auth_server: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
823ce6f50f s3:auth_domain: we already have the dc_name, it's the same as cli->desthost
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
b87bd59ecb s3:libsmb: add cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
b3e0b73280 s3:libsmb: remove const from cli_cm_display()
metze
2011-07-22 17:06:09 +02:00
Björn Baumbach
a560b793ca s3-torture: run_locktest4(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-22 17:06:09 +02:00
Björn Baumbach
0986b0bed7 s3-torture: introduce test_cli_read()
test_cli_read calls cli_read and returns success or failure

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
48de329363 s3:libsmb: move cli_state->{src_ss,dest_ss} to cli_state->conn.{local_ss,remote_ss}
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
cc4b2a6dc3 s3:net_rpc_printer: make use of cli_state_remote_sockaddr()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
9b40092cbd s3:net_rpc: make use of cli_state_remote_sockaddr()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
a46b265563 s3:net_rpc_join: make use of cli_state_remote_sockaddr()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
f0c1b5dad2 s3:net_rpc_join: pass const sockaddr_storage to net_rpc_join_ok()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
e91797689b s3:net_util: pass const sockaddr_storage to net_make_ipc_connection_ex()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
f7cd20d43c s3:net_util: add some const to sockaddr_storage
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
b76951ba8f s3:auth_domain: add some const to sockaddr_storage
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
5c7749ac24 s3:libsmb: only pass const sockaddr_storage to cli_full_connection()
No direct or indirect caller needs this to be set.

metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
552164c7bc s3:smbcquotas: pass down NULL instead of a zero sockaddr_storage
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
d60a1b4bb0 s3:smbcacls: pass down NULL instead of a zero sockaddr_storage
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
814449ab01 s3:libsmb_server: pass NULL instead of a zero sockaddr_storage
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
1eb8c2ae22 s3:libsmb: only pass a const sockaddr_storage to cli_start_connection()
Let the caller use cli_state_remote_sockaddr() if needed.

metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
6cc61d6341 s3:net_time: expect const sockaddr_storage in cli_servertime()
We don't want to modify the value.

metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
0cd70ec169 s3:libsmb: let cli_connect_nb() only expect a const sockaddr_storage *dest_ss
Only one caller expects this value to be set,
which now calls cli_state_remote_sockaddr() to get the value.

metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
7f0b4eed3b s3:libsmb: use cli_state_remote_sockaddr() in smb2cli_tcon_send()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
acf4b84cbf s3:libnet: use cli_state_remote_sockaddr() in libnet_DomainJoin()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
8bea5d6402 s3:winbindd_cm: use cli_state_[local|remote]_sockaddr()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
fa42d2e262 s3:libsmb: add cli_state_[local|remote]_sockaddr()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
13dbd5021b s3:libsmb: move cli_state->fd to cli_state->conn.fd
metze
2011-07-22 17:06:07 +02:00
Stefan Metzmacher
6d1757f189 s3:libsmb: make use of cli_state_disconnect()
metze
2011-07-22 17:06:07 +02:00
Stefan Metzmacher
103413da8b s3:libsmb: make use of cli_state_is_connected()
metze
2011-07-22 17:06:07 +02:00
Stefan Metzmacher
cd71c5746b s3:torture: use cli_state_disconnect() to close the socket on SIGALRM
metze
2011-07-22 17:06:07 +02:00
Stefan Metzmacher
5bd80b20a1 s3:smbtree: try to fix completely broken logic in get_workgroups()
metze
2011-07-22 17:06:07 +02:00
Michael Adam
efbe1602bd s3:loadparm: fix the reload of the configuration: also reload activated registry shares
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 22 16:53:49 CEST 2011 on sn-devel-104
2011-07-22 16:53:49 +02:00
Michael Adam
ec113a58a4 s3:loadparm: add reload_registry_shares() - reload only those shares already loaded 2011-07-22 15:42:18 +02:00
Michael Adam
2b4bb9b7a1 s3:smbclient: print nt status code when smb echo fails 2011-07-22 15:42:17 +02:00
Michael Adam
d67a91b955 s3:smbclient: add a "tdis" command to view and change the tree id (tid).
This low level command can be used to switch between tree connects in one
session.
2011-07-22 15:42:17 +02:00
Michael Adam
7327bde81a s3:smbclient: add a "tdis" command to do a tree disconnect (close a connection to a share) 2011-07-22 15:42:17 +02:00
Michael Adam
88d0e44df3 s3:smbclient: add a "tcon" command to do a tree connect (connect to a share) 2011-07-22 15:42:16 +02:00
Michael Adam
281c6d02bd s3:smbclient: add "logoff" command to close the session 2011-07-22 15:42:16 +02:00
Stefan Metzmacher
a11cc880ef s3:libsmb: move cli_state->outgoing to cli_state->conn.outgoing
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul 22 09:53:59 CEST 2011 on sn-devel-104
2011-07-22 09:53:59 +02:00
Stefan Metzmacher
9f2b3b0be6 s3:libsmb: move cli_state->pending to cli_state->conn.pending
metze
2011-07-22 08:44:08 +02:00
Stefan Metzmacher
b94a7caa3a s3:libsmb: fix compiler warnings in cli_state_create()
metze
2011-07-22 08:44:08 +02:00
Jeremy Allison
fafd386910 Fix const warning.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jul 22 01:58:39 CEST 2011 on sn-devel-104
2011-07-22 01:58:39 +02:00
Simo Sorce
b19b05cd0a s3-rpc_server: Do not set msg_ctx twice
msg_ctx was already passed to make_base_pipes_struct,
no need to set it again.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Fri Jul 22 00:47:28 CEST 2011 on sn-devel-104
2011-07-22 00:47:28 +02:00
Stefan Metzmacher
2b1fc7c0d3 s3:winbindd_cm: remove unused checks for address family
If we got a connection, we don't need to check what
address family it uses.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jul 21 23:33:48 CEST 2011 on sn-devel-104
2011-07-21 23:33:48 +02:00
Stefan Metzmacher
ebe258dd40 s3:libsmb: replace cli_initialise[_ex]() by cli_state_create()
This makes sure cli_state->src_ss and cli_state->dest_ss are always
initialized.

metze
2011-07-21 22:08:53 +02:00
Stefan Metzmacher
04b740d18b s3:include: remove unused cli_state->called and cli_state->calling
metze
2011-07-21 22:08:53 +02:00
Stefan Metzmacher
392ddf970c s3:libsmb: don't pass cli->called.name to NTLMv2_generate_names_blob()
cli->called.name is never initialized, so this change doesn't change
the behavior. And this behavior seems to be correct, see
commit 29c0c37691
s4/libcli: do not use netbios name in NTLMv2 blobs w/o spnego.

metze
2011-07-21 22:08:52 +02:00
Stefan Metzmacher
25447a528a s3:libsmb: move cli->vuid to cli->smb1.uid and hide it behind cli_state_[g|s]et_uid()
metze
2011-07-21 22:08:52 +02:00
Stefan Metzmacher
c70103f3f8 s3:libsmb: add cli_state_encryption_on()
metze
2011-07-21 22:08:51 +02:00
Andreas Schneider
fb2ee304a8 s3-rpc_server: Pass msg_ctx to make_base_pipes_struct().
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Jul 21 21:08:32 CEST 2011 on sn-devel-104
2011-07-21 21:08:31 +02:00
Simo Sorce
156a0ffe54 s3-rpc_server: Create common function to allocate pipes_struct
Avoid code duplication and fix bug where a new pipe was not added to
InternalPipes upon creation in make_server_pipes_struct()

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Jul 21 19:50:02 CEST 2011 on sn-devel-104
2011-07-21 19:50:02 +02:00
Simo Sorce
759a04e58a s3-rpc_server: Move pipe/handles functions
Put InternalPipes related functions in rpc_handles.c and out of rpc_ncacn_np.c
rpc_handles.c is the only file that really uses them after all and ncacn_np.c
is the wrong place for that stuff.
While ther remove unnecessary wrapper functions now that the InternalPipes
static variable is directly accessible.

Also move all pipes_struct related header stuff in its own rpc_pipes.h header.

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-07-21 18:40:23 +02:00
Andreas Schneider
0d8f65b346 s3-rpc_server: Fixed header define. 2011-07-21 18:40:23 +02:00
Andreas Schneider
6a4a6efdc9 s3-rpc_server: Remove unused endpoint information. 2011-07-21 18:40:23 +02:00
Andreas Schneider
4a6a588e44 s3-rpc_server: We need to copy the session_info for external pipes.
Andrew please check!
2011-07-21 18:40:23 +02:00
Andreas Schneider
19288f9784 s3-rpc_server: Duplicate the pipe name. 2011-07-21 18:40:23 +02:00
Andreas Schneider
3a43ef52db s3-rpc_server: Free the np dir. 2011-07-21 18:40:22 +02:00
Andreas Schneider
304e8116a9 s3-rpc_server: Fix messaging context in the pipes struct. 2011-07-21 18:40:22 +02:00
Andreas Schneider
f5da8ed889 s3-rpc_server: Add my copyright. 2011-07-21 18:40:22 +02:00
Michael Adam
71b49f5596 s3:loadparm: fix an implicit cast warning in string intialization in init_globals()
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Jul 21 18:39:15 CEST 2011 on sn-devel-104
2011-07-21 18:39:15 +02:00
Michael Adam
cf50df5c69 s3:loadparm: add support for P_BYTES to lp_do_parameter() - fix a build warning
(taken from s4 loadparm)
2011-07-21 17:24:18 +02:00
Michael Adam
5158fd1688 s3:loadparm: add support for P_CMDLIST to lp_do_parameter - fix a build warning 2011-07-21 17:24:18 +02:00
Michael Adam
3c8e94b6c4 s3:loadparm: add support for P_CMDLIST to lp_save_defaults() - fix build warning 2011-07-21 17:24:18 +02:00
Michael Adam
ebdec404a4 s3:loadparm: add support for P_BYTES to lp_save_defaults - fix build warning 2011-07-21 17:24:18 +02:00
Michael Adam
ae0f66756a s3:loadparm: add support for P_CMDLIST to is_default() - fix build warning 2011-07-21 17:24:17 +02:00
Michael Adam
8223eb7a27 s3:loadparm: add support for P_BYTES to is_default() - fix build warning 2011-07-21 17:24:17 +02:00
Michael Adam
8ecf51a553 s3:loadparm: add support for P_CMDLIST to print_parameter - fix build warning. 2011-07-21 17:24:17 +02:00
Michael Adam
81e4d1f63d s3:loadparm: add support for P_BYTES to print_parameter() - fix build warning. 2011-07-21 17:24:17 +02:00
Michael Adam
72f23c7ba3 s3:loadparm: add support for P_CMDLIST to equal_parameter() - fix build warning 2011-07-21 17:24:17 +02:00
Michael Adam
641beeb2a3 s3:loadparm: add suppor for P_BYTES to equal_parameter() - fix build warning 2011-07-21 17:24:17 +02:00
Michael Adam
64afd5c486 s3:loadparm: szNetbiosAliases is now a const char ** - cast properly 2011-07-21 17:24:16 +02:00
Michael Adam
cc897b13ff s3:loadparm: szWinbindNssInfo is now a const char ** instead of a char ** - cast properly 2011-07-21 17:24:16 +02:00
Michael Adam
fc525c8a25 s3:loadparm: fix a check that was accidentially an assignment in lp_servicebynum() 2011-07-21 17:24:16 +02:00
Michael Adam
2568a8b463 s3:loadparm: untangle assignment from check in do_section() 2011-07-21 17:24:16 +02:00
Christian Ambach
fb766cd597 s3-waf: fix a libcrypto configure check
the parameters to conf.CHECK_FUNCS_IN were in the wrong order

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu Jul 21 16:49:52 CEST 2011 on sn-devel-104
2011-07-21 16:49:51 +02:00
Christian Ambach
bca69bfbc3 s3:winbindd remove an unused variable
fixes a compiler warning
2011-07-21 14:57:10 +02:00
Christian Ambach
410c4deefe s3:utils fix a compiler warning
fix a compiler warning about missing prototypes
2011-07-21 14:57:10 +02:00
Christian Ambach
62825b0ff9 s3:modules/vfs_afsacl fix a compiler warning 2011-07-21 14:55:09 +02:00
Christian Ambach
4370dc11bd s3:afs make path argument to afs_syscall const 2011-07-21 14:55:08 +02:00
Christian Ambach
dcd10fa4e5 s3:modules/vfs_afsacl fix a compiler warning 2011-07-21 14:55:08 +02:00
Christian Ambach
c5cbdc21d1 s3:modules/vfs_afsacl use stdbool types 2011-07-21 14:55:08 +02:00
Christian Ambach
c8b4414c0a s3:modules/vfs_afsacl remove some unnecessary whitespace 2011-07-21 14:55:07 +02:00
Christian Ambach
f2be12fa8f s3:lib/afs fix the build with --with-vfs-afsacl
This fixes the second piece of Bug #8263
2011-07-21 14:55:07 +02:00
Christian Ambach
ffef23d40f s3:lib/afs use stdbool types 2011-07-21 14:55:06 +02:00
Christian Ambach
9779af85d6 s3:utils/net_afs fix compiler warnings 2011-07-21 14:55:01 +02:00
Christian Ambach
ffbecc0cf6 s3:lib/afs_settoken fix some compiler warnings 2011-07-21 14:54:50 +02:00
Christian Ambach
a78407b9ca s3:lib/afs fix some compiler warnings 2011-07-21 14:54:46 +02:00
Christian Ambach
3b231e6a12 s3:lib/afs fix the build with --with-fake-kaserver
This fixes one piece of Bug #8263
2011-07-21 14:51:28 +02:00
Björn Baumbach
d622cadd34 s3-torture: run_simple_posix_open_test(): replace cli_read_old() with
cli_read()

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jul 20 23:22:09 CEST 2011 on sn-devel-104
2011-07-20 23:22:09 +02:00
Björn Baumbach
c53e2ad4de s3-torture: rw_torture2(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:26 +02:00
Björn Baumbach
ea4c4480b4 s3-torture: rw_torture3(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:26 +02:00
Björn Baumbach
b10fa4bbcd s3-torture: rw_torture(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:26 +02:00
Björn Baumbach
8c360d7f76 s3-libsmb: introduce new NTSTATUS cli_read()
Replacement for cli_read_old()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:25 +02:00
Björn Baumbach
9b168e128a s3-libsmb: replace cli_read() with cli_read_old()
Will introduce new cli_read() function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:25 +02:00
Stefan Metzmacher
8f41e54d53 s3:libsmb: move cli->cnum to cli->smb1.tid and hide it behind cli_state_[g|s]et_tid()
metze
2011-07-20 15:56:27 +02:00
Stefan Metzmacher
1e3822115c s3:libsmb: move cli->pid to cli->smb1.pid and hide it behind cli_[g|s]etpid()
metze
2011-07-20 15:55:08 +02:00
Stefan Metzmacher
9fb7e228f5 s3:libsmb: add cli->smb1.vc_num and hide it behind cli_state_get_vc_num()
This makes it clearer, why we send the pid value in the session setup.

metze
2011-07-20 15:54:31 +02:00
Stefan Metzmacher
6c31b610e4 s3:libsmb: move cli->mid to cli->smb1.mid
metze
2011-07-20 15:48:59 +02:00
Stefan Metzmacher
21a6bdc680 s3:libsmb: smb_bytes_talloc_string() doesn't need a cli_state
metze
2011-07-20 15:48:58 +02:00
Andrew Bartlett
481f05ce02 s3-gse Work around the MIT 1.9 gss_krb5_import_cred
We detect this function at configure time, but it currently fails to
operate the way we need - that is, when the principal is not
specified, it gives this error.  When the principal is specified we
get 'wrong principal in request' in the GSS acceptor, so for now the
best option is to fall back to the alternate approach.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jul 20 06:35:05 CEST 2011 on sn-devel-104
2011-07-20 06:35:05 +02:00
Andrew Bartlett
8ee3ba791d s3-gse Allow printing the partial error string
We may not be able to obtain the full error string, so print what we can get.

This is required when the error is the the GSSAPI layer, not the mechanism.

Andrew Bartlett
2011-07-20 12:04:45 +10:00
Andrew Bartlett
57ab47c02e s3-auth fix dummy function in the not-with-kerberos case 2011-07-20 11:40:02 +10:00
Andrew Bartlett
d8cce7d466 s3-auth Replace False with false in auth_util.c
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jul 20 02:31:15 CEST 2011 on sn-devel-104
2011-07-20 02:31:15 +02:00
Andrew Bartlett
c2ce806790 s3-auth Replace True with true in auth_util.c 2011-07-20 09:17:15 +10:00
Andrew Bartlett
bdd794cd62 s3-auth Fix spelling 2011-07-20 09:17:15 +10:00
Andrew Bartlett
d2a661a531 s3-auth Remove pointless destructor in make_server_info
All the callers allocate ->info3 as a talloc child already.

As regardes the TALLOC_ZERO(), I added this originally out of parinoia
many years ago.  We do not consistantly zero session keys in memory,
and for NTLMv2 and Kerberos they are random for each sesssion, so
breaking into smbd far enough to read an old session key isn't a
particularly interesting attack, compared with (say) reading the
keytab or the password database.  (NTLM and LM session keys are fixed
derivitives of the passwords however).

Andrew Bartlett
2011-07-20 09:17:15 +10:00
Andrew Bartlett
15123d96ff s3-auth inline make_auth_session_info into only caller 2011-07-20 09:17:15 +10:00
Andrew Bartlett
6622821063 s3-auth Remove seperate guest boolean
Instead, we base our guest calculations on the presence or absense of the
authenticated users group in the token, ensuring that we have only
one canonical source of this important piece of authorization data

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:14 +10:00
Andrew Bartlett
9d09b66f41 auth: Set NETLOGON_GUEST and use it to determine guest status
These additional measures should help ensure we do not accidentily upgrade
a guest to an authenticated user in the future.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:14 +10:00
Andrew Bartlett
52b28ec813 auth: Split out make_user_info_SamBaseInfo and add authenticated argument
This will allow the source3 auth code to call this without needing to
double-parse the SIDs

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:14 +10:00
Andrew Bartlett
03b153ce54 s3-rpc_server remove per-element copies of auth_session_info
This is not required any more now that they are the same structure,
and shows the value in having a common structure across the codebase.

In particular, now any additional state that needs to be added to the
auth_session_info will be transparently available across the named
pipe proxy, without a need to modify the mapping layer.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
9fcc617ff5 s3-auth Use the common auth_session_info
This patch finally has the same structure being used to describe the
authorization data of a user across the whole codebase.

This will allow of our session handling to be accomplished with common code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
128ae06a61 s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_info
This makes auth3_session_info identical to auth_session_info

The logic to convert the info3 to a struct auth_user_info is
essentially moved up the stack from the named pipe proxy in
source3/rpc_server to create_local_token().

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
8d72e612ac s3-rpc_server read and write the unix_token and unix_info across named_pipe_auth
This ensures that the exact same token is used on both sides of the
pipe, when a full token is passed (ie, source3 to source3, but not yet
source4 to to source3 as the unix info isn't calculated there yet).

If we do not have unix_token, we fall back to the old behaviour and go
via create_local_token().  (However, in this case the security_token
is now overwritten, as it is better to have it match the rest of the
session_info create_local_token() builds).

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
594597eb65 s3-auth reimplement copy_session_info via NDR pull/push
This ensures we do not miss elements.  Pattern copied from auth_netlogond.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
9d96b78f31 s3-auth Remove pointless destructor
All the users of this structure allocate info3 on the session_info

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
7b273df175 s3-auth import auth3_session_info into IDL
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:12 +10:00
Andrew Bartlett
86f2a197df s3-auth Avoid redundant copies in create_local_token()
These values were not read before being overwritten again.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:12 +10:00
Andrew Bartlett
4363b71f62 s3-auth Add comments to copy_session_info_serverinfo_guest()
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:12 +10:00
Andrew Bartlett
74815e08d9 s3-auth inline copy_serverinfo_session_info into only caller
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:12 +10:00
Andrew Bartlett
140435f399 s3-auth use a cached auth_serversupplied_info in make_server_info_guest()
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:12 +10:00
Andrew Bartlett
fc19c699a9 s3-auth remove extra from auth3_session_info
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:12 +10:00
Andrew Bartlett
894fc14a2e s3-auth Clarify inputs and ouptuts by using elements from server_info
This allows us not the put all of these elements into the auth3_session_info
if they are only used as inputs to these functions.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:12 +10:00
Andrew Bartlett
d22ff66afa s3-auth assert that security_token is present in the copy, and explain why nss_token can be skipped
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10:00
Andrew Bartlett
ba53498c66 s3-auth Remove unused nss_token variable
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10:00
Andrew Bartlett
eea444f465 s3-auth: Remove unused lm_session_key from auth3_session_info
The long term authorization state needs only the final, negotiated
session key, and not the original LM key that may possibly have been
an input.

The special case of the guest account simply needs both values filled
back in with the zeros to avoid changing behaviour in the cached
server_info.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10:00
Andrew Bartlett
058f5e60c5 s3-auth remove unused copy_serverinfo
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10:00
Andrew Bartlett
ec5f1b78af s3-auth Use system boolean in auth_user_info_unix
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10:00
Andrew Bartlett
e2049e77e4 s3-auth Use guest boolean in auth_user_info_unix
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10:00
Andrew Bartlett
9289537993 s3-auth Use struct auth_user_info_unix for unix_name and sanitized_username
This is closer to the layout of struct auth_session_info in auth.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:11 +10:00
Andrew Bartlett
6d741e918f s3-auth Use *unix_token rather than utok in struct auth3_session_info
This brings this structure one step closer to the struct auth_session_info.

A few SMB_ASSERT calls are added in some key places to ensure that
this pointer is initialised, to make tracing any bugs here easier in
future.

NOTE: Many of the users of this structure should be reviewed, as unix
and NT access checks are mixed in a way that should just be done using
the NT ACL.  This patch has not changed this behaviour however.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andrew Bartlett
f16d8f4eb8 s3-auth Use struct auth3_session_info outside the auth subsystem
This seperation between the structure used inside the auth modules and
in the wider codebase allows for a gradual migration from struct
auth_serversupplied_info -> struct auth_session_info (from auth.idl)

The idea here is that we keep a clear seperation between the structure
before and after the local groups, local user lookup and the session
key modifications have been processed, as the lack of this seperation
has caused issues in the past.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andrew Bartlett
d7d8a5ed94 s3-auth Add struct auth3_session_info to aid transition to auth_session info
This will allow a gradual conversion of the required elements from the
current struct auth_serversupplied_info.

This commit adds the structure definition and some helper functions to
copy between the two structures.

At this stage these structures and functions are IDENTICAL to the
existing code, and so show the past history of that code.  The plan is
to slowly modify them over the course of the patch series, so that the
changes being made a clear.

By using a seperate structure to auth_serversupplied_info we can
remove elements that are not needed after the authentication, and we
can choose a layout that best reflects the needs of runtime users,
rather than the internals of the authentication subsystem.

By eventually using the auth_session_info from auth.idl, we will gain
a single session authorization structure across the whole codebase,
allowing more code to be shared, and a much more transparent process
for forwarding authorization credentials over the named pipe proxy.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andrew Bartlett
e244319599 s3-auth Add const to indicate input elements
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andrew Bartlett
fa18267042 auth: Preserve guest flag on transition via netr_SamInfo3
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andrew Bartlett
f47662f363 s3-auth Restore nss_token behaviour by reading from server_info
The implementation of copy_serverinfo(), used to copy server_info into
session_info never copied the nss_token variable, and so
17d8f0ad30 introduced this regression.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andrew Bartlett
55ad1da888 Add my copyright
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:09 +10:00
Andrew Bartlett
485898458a debug: log early messages to stdout, and keep it open
The --log-stdout option was compromised by the log file descriptors being
closed once the file process forked.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:09 +10:00
Jeremy Allison
93dcfdea38 Second part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems.
Re-add:
	smb_ucs2_t toupper_w(smb_ucs2_t v);

and ensure it is called whenever we are operating on smb_ucs2_t
variables. I'd like to make the definition of smb_ucs2_t incompatible
with int and codepoint_t so they can't be mixed, but that's a patch
for another time.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jul 19 23:48:05 CEST 2011 on sn-devel-104
2011-07-19 23:48:05 +02:00