Jeremy Allison [Fri, 5 Mar 2010 23:10:30 +0000 (15:10 -0800)]
Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.
Ensure we don't use any of the create_options for Samba private
use. Add a new parameter to the VFS_CREATE call (private_flags)
which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS
and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code).
Rev. the VFS interface to version 28.
Jeremy.
Kamen Mazdrashki [Thu, 4 Mar 2010 16:00:15 +0000 (18:00 +0200)]
s4/tort: fix annoying "union spoolss_PrinterInfo" undefined warnings
Signed-off-by: Günther Deschner <gd@samba.org>
Günther Deschner [Fri, 5 Mar 2010 21:03:26 +0000 (22:03 +0100)]
s3: re-run make samba3-idl.
Guenther
Günther Deschner [Fri, 5 Mar 2010 20:56:50 +0000 (21:56 +0100)]
winreg: fix winreg_QueryValue IDL.
Note that before this change pidl generated code that just dereferenced size_is
and length_is values from unique pointers without checking whether these
pointers were actually NULL.
With this change, pidl now throws a warning like:
warning: Got pointer for `data_size', expected fully derefenced variable
which is not correct, probably because pidl does not evaluate the C expression.
Guenther
Andreas Schneider [Fri, 5 Mar 2010 10:15:35 +0000 (11:15 +0100)]
s3-rpcclient: Leave setprinterdata directly if not enough args were passed.
If we don't pass enough arguments we don't have to close the connection.
Signed-off-by: Günther Deschner <gd@samba.org>
Andreas Schneider [Fri, 5 Mar 2010 14:54:31 +0000 (15:54 +0100)]
s3-rpc_server: Document rpc_pipe_open_internal.
Signed-off-by: Günther Deschner <gd@samba.org>
Günther Deschner [Fri, 5 Mar 2010 19:32:16 +0000 (20:32 +0100)]
s4-smbtorture: fix RPC-SPOOLSS-WIN after PrinterData IDL changes.
Guenther
Matthias Dieter Wallnöfer [Sat, 21 Nov 2009 17:57:24 +0000 (18:57 +0100)]
s4:drsuapi RPC - Change also here counters to "unsigned"
No need to have "signed" counters at those places.
Matthias Dieter Wallnöfer [Fri, 6 Nov 2009 19:14:41 +0000 (20:14 +0100)]
s4:dsdb/util - Change also here counters to "unsigned"
No need to have "signed" counters at those places.
Matthias Dieter Wallnöfer [Fri, 6 Nov 2009 19:14:41 +0000 (20:14 +0100)]
s4:repl - change also here the counter variables to "unsigned"
I changed also some "uint32_t" to "unsigned" since the LDB interface doesn't
specify the bitlength of the unsigned type.
Matthias Dieter Wallnöfer [Sat, 7 Nov 2009 20:15:17 +0000 (21:15 +0100)]
s4:wrepl_server - change also here the counter variables to "unsigned"
I changed also some "uint32_t" to "unsigned" since the LDB interface doesn't
specify the bitlength of the unsigned type.
Volker Lendecke [Fri, 5 Mar 2010 16:06:08 +0000 (17:06 +0100)]
s3: Make "smbcontrol xx debuglevel" print the correct cluster pid
Günther Deschner [Fri, 5 Mar 2010 15:34:17 +0000 (16:34 +0100)]
s4-spoolss: fix dcesrv_spoolss_GetPrinterData build.
really not my day today...
Guenther
Günther Deschner [Fri, 5 Mar 2010 15:00:14 +0000 (16:00 +0100)]
s4-smbtorture: fix test_SetPrinterDataEx_matrix() call. sorry...
Guenther
Volker Lendecke [Fri, 5 Mar 2010 14:30:22 +0000 (15:30 +0100)]
s3: Remove the unused parameter "persistent" from fetch_locked_internal
Volker Lendecke [Fri, 5 Mar 2010 14:28:39 +0000 (15:28 +0100)]
s3: db->persistent==true was handled earlier, make this more obvious
Günther Deschner [Fri, 5 Mar 2010 13:42:10 +0000 (14:42 +0100)]
s4-smbtorture: when checking PrinterData matrix, include winreg cross reference checks.
Guenther
Günther Deschner [Fri, 5 Mar 2010 13:03:03 +0000 (14:03 +0100)]
s4-smbtorture: hand down printername to test_SetPrinterDataEx_matrix.
Guenther
Günther Deschner [Thu, 4 Mar 2010 23:56:52 +0000 (00:56 +0100)]
s4-smbtorture: add more paranoid checks for REG_DWORD SetPrinterDataEx tests.
Guenther
Günther Deschner [Thu, 4 Mar 2010 22:13:10 +0000 (23:13 +0100)]
s4-smbtorture: remove check for selfmade parsing artefact.
We were checking against a phenomenon that we created ourselves at the pidl
layer...
Guenther
Günther Deschner [Thu, 4 Mar 2010 16:58:49 +0000 (17:58 +0100)]
s3-libads: fix get_remote_printer_publishing_data after spoolss_EnumPrinterDataEx IDL change.
Guenther
Günther Deschner [Thu, 4 Mar 2010 15:47:33 +0000 (16:47 +0100)]
s3-spoolss: fix _spoolss_EnumPrinterDataEx after idl
Guenther
Günther Deschner [Thu, 4 Mar 2010 15:47:10 +0000 (16:47 +0100)]
s3-rpcclient: fix rpcclient after spoolss_EnumPrinterDataEx IDL change.
Guenther
Günther Deschner [Thu, 4 Mar 2010 15:46:53 +0000 (16:46 +0100)]
s3-net: fix net after spoolss_EnumPrinterDataEx IDL change.
Guenther
Günther Deschner [Thu, 4 Mar 2010 16:04:19 +0000 (17:04 +0100)]
s3: re-run make samba3-idl.
Guenther
Günther Deschner [Thu, 4 Mar 2010 15:40:31 +0000 (16:40 +0100)]
spoolss: fix spoolss_EnumPrinterDataEx IDL.
Guenther
Günther Deschner [Thu, 4 Mar 2010 21:40:31 +0000 (22:40 +0100)]
s4-smbtorture: fix smbtorture after GetPrinterData{Ex} after IDL changes.
Guenther
Günther Deschner [Thu, 4 Mar 2010 17:21:50 +0000 (18:21 +0100)]
s4-spoolss: fix spoolss_GetPrinterData implementation after IDL change.
Guenther
Günther Deschner [Thu, 4 Mar 2010 14:46:28 +0000 (15:46 +0100)]
s3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change.
Guenther
Günther Deschner [Thu, 4 Mar 2010 14:39:59 +0000 (15:39 +0100)]
s3-spoolss: fix _spoolss_GetPrinterDataEx after IDL change.
Guenther
Günther Deschner [Thu, 4 Mar 2010 16:02:42 +0000 (17:02 +0100)]
s3: re-run make samba3-idl.
Guenther
Günther Deschner [Thu, 4 Mar 2010 14:38:18 +0000 (15:38 +0100)]
spoolss: rollback GetPrinterData[Ex] IDL.
Guenther
Günther Deschner [Thu, 4 Mar 2010 21:22:45 +0000 (22:22 +0100)]
s4-smbtorture: fix smbtorture after SetPrinterData{Ex} IDL changes.
Guenther
Günther Deschner [Thu, 4 Mar 2010 14:34:49 +0000 (15:34 +0100)]
s3-rpcclient: fix rpcclient after spoolss_SetPrinterData{Ex} IDL change.
Guenther
Günther Deschner [Thu, 4 Mar 2010 14:34:22 +0000 (15:34 +0100)]
s3-net: fix net after spoolss_SetPrinterData{Ex} IDL change.
Guenther
Günther Deschner [Thu, 4 Mar 2010 16:00:34 +0000 (17:00 +0100)]
s3-spoolss: fix _spoolss_SetPrinterData{Ex} after IDL change.
Guenther
Günther Deschner [Thu, 4 Mar 2010 16:00:09 +0000 (17:00 +0100)]
s3: re-run make samba3-idl.
Guenther
Günther Deschner [Wed, 3 Mar 2010 17:22:57 +0000 (18:22 +0100)]
spoolss: rollback SetPrinterData{Ex} IDL.
Guenther
Matthias Dieter Wallnöfer [Fri, 5 Mar 2010 14:01:07 +0000 (15:01 +0100)]
s4:dcesrv_samr_AddAliasMember - wrap a long "DEBUG" statement
Stefan Metzmacher [Wed, 3 Mar 2010 17:35:55 +0000 (18:35 +0100)]
s4:libcli/wrepl: convert wrepl_associate_stop_send to tevent_req
metze
Stefan Metzmacher [Wed, 3 Mar 2010 16:18:23 +0000 (17:18 +0100)]
s4:libcli/wrepl: convert wrepl_connect_send to tevent_req
metze
Stefan Metzmacher [Wed, 3 Mar 2010 17:38:16 +0000 (18:38 +0100)]
s4:libcli/wrepl: convert wrepl_associate_send to tevent_req
metze
Stefan Metzmacher [Wed, 3 Mar 2010 14:14:28 +0000 (15:14 +0100)]
s4:libcli/wrepl: convert wrepl_pull_table_send to tevent_req
metze
Stefan Metzmacher [Wed, 3 Mar 2010 14:12:05 +0000 (15:12 +0100)]
s4:libcli/wrepl: convert wrepl_pull_names_send to tevent_req
metze
Stefan Metzmacher [Wed, 3 Mar 2010 12:38:08 +0000 (13:38 +0100)]
s4:libcli/wrepl: use UTIL_TEVENT
metze
Stefan Metzmacher [Wed, 3 Mar 2010 08:45:01 +0000 (09:45 +0100)]
s4:libcli/wrepl: avoid neested named structures
metze
Stefan Metzmacher [Wed, 3 Mar 2010 10:31:03 +0000 (11:31 +0100)]
s4:torture/nbt: avoid the usage of wrepl_pull_table_send()
metze
Stefan Metzmacher [Fri, 5 Mar 2010 07:22:36 +0000 (08:22 +0100)]
libcli/auth: add a const to des_crypt112_16()
metze
Stefan Metzmacher [Fri, 5 Mar 2010 10:16:12 +0000 (11:16 +0100)]
s3:winbindd: add DEBUG(10,...) for the end of each top level
That will hopefully make debugging a bit easier (at least for me).
metze
Matthias Dieter Wallnöfer [Fri, 6 Nov 2009 19:14:41 +0000 (20:14 +0100)]
s4:kcc - Change some counter variables to be unsigned
The upper limits are unsigned variables therefore also the counter variables
need to be like that.
Matthias Dieter Wallnöfer [Fri, 6 Nov 2009 19:14:41 +0000 (20:14 +0100)]
s4:samdb_privilege.c - Change two counter variables to unsigned
Also here in both cases the unsigned counter fits better than the signed one.
Matthias Dieter Wallnöfer [Fri, 6 Nov 2009 19:14:41 +0000 (20:14 +0100)]
s4:cracknames - Change two counter variables to unsigned
In both cases the unsigned counter fits better:
- in the first one since we are counting LDB objects starting from 0
- in the second since we are counting an array starting from 0
Andrew Tridgell [Fri, 5 Mar 2010 12:07:26 +0000 (23:07 +1100)]
s4-pvfs_sys: build on systems without O_NOFOLLOW or O_DIRECTORY
Andrew Tridgell [Fri, 5 Mar 2010 11:58:18 +0000 (22:58 +1100)]
s4-pvfs_sys: talloc_free should be before errno restore
talloc can potentially change the errno
Andrew Tridgell [Fri, 5 Mar 2010 11:48:09 +0000 (22:48 +1100)]
s4-pvfs: use pvfs_sys_fchmod()
Andrew Tridgell [Fri, 5 Mar 2010 11:47:50 +0000 (22:47 +1100)]
s4-pvfs: set default for perm override based on system features
If the system has O_NOFOLLOW and O_DIRECTORY then we allow for
overrides by default. If not, then we disable by default, as we will
be more vulnerable to symlink attacks
Andrew Tridgell [Fri, 5 Mar 2010 11:46:44 +0000 (22:46 +1100)]
s4-pvfs: use O_FOLLOW one level at a time for security overrides
To prevent symlink attacks we need to use O_NOFOLLOW one level at a
time when processing a root security override
Andrew Tridgell [Fri, 5 Mar 2010 11:45:27 +0000 (22:45 +1100)]
replace: added get_current_dir_name()
Andrew Tridgell [Fri, 5 Mar 2010 06:52:35 +0000 (17:52 +1100)]
s4-pvfs: use pvfs_sys_*() functions to wrap posix calls
This allows for root override, which fixes many problems with
mismatches between NT ACL permissions and unix permissions.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Andrew Tridgell [Fri, 5 Mar 2010 06:51:12 +0000 (17:51 +1100)]
s4-pvfs: new pvfs_sys module
The pvfs_sys_*() calls provide wrapper functions for posix file
functions which use root privileges to override EACCES failures if
PVFS_FLAG_PERM_OVERRIDE is set
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Andrew Tridgell [Fri, 5 Mar 2010 06:50:18 +0000 (17:50 +1100)]
s4-pvfs: added new pvfs flag PVFS_FLAG_PERM_OVERRIDE
This flag indicates that we should use root privileges to override
unix permissions when the NT ACLs indicate that access should be
granted
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Andrew Tridgell [Fri, 5 Mar 2010 06:49:11 +0000 (17:49 +1100)]
s4-privs: add root_privileges_original_uid()
This can be used to get the uid we changed away from when we gained
root privileges
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Günther Deschner [Fri, 5 Mar 2010 10:06:46 +0000 (11:06 +0100)]
s3-selftest: enable RPC-WINREG against Samba 3.
Guenther
Günther Deschner [Fri, 5 Mar 2010 10:06:18 +0000 (11:06 +0100)]
s4-smbtorture: skip NotifyChangeKeyValue test against s3 for now.
Guenther
Matthias Dieter Wallnöfer [Fri, 5 Mar 2010 07:50:08 +0000 (08:50 +0100)]
s4:torture/rpc/samr.c - add some decision possibility constants to some switch
At the moment nothing is done when the enumeration variable is set to one of
those constants as before. This is only to quite nasty warnings.
Matthias Dieter Wallnöfer [Fri, 5 Mar 2010 07:49:25 +0000 (08:49 +0100)]
s4:torture/rpc/samr.c - make some argument of function "test_SamLogon_with_creds" constant
This to quiet warnings.
Matthias Dieter Wallnöfer [Fri, 5 Mar 2010 07:47:48 +0000 (08:47 +0100)]
s4:torture/winbind/struct_based.c - fix up (un)signedness of a function argument
Otherwise always a warning is generated.
Andrew Tridgell [Fri, 5 Mar 2010 03:59:08 +0000 (14:59 +1100)]
s4-pvfs: log more error conditions in NTVFS backend
This should make is easier to track down some bug reports
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Andrew Tridgell [Fri, 5 Mar 2010 03:57:50 +0000 (14:57 +1100)]
s4-pvfs: move the private ntcreatex flags to private_flags
Re-using two of the create_options bits was bound to eventually
cause problems, and indeed, Windows7 now uses one of those bits
when opening text files.
Fixes bug 7189
Andrew Tridgell [Fri, 5 Mar 2010 02:49:49 +0000 (13:49 +1100)]
s4-rpc: don't use s->credentials after it is freed
Andrew Tridgell [Fri, 5 Mar 2010 02:02:16 +0000 (13:02 +1100)]
s4-torture: fixed commas separating C statements
Bo Yang [Sat, 6 Mar 2010 12:58:23 +0000 (20:58 +0800)]
s3: Fix unnecessary traversing winbindd_cache.tdb in SIGHUP handler.
Signed-off-by: Bo Yang <boyang@samba.org>
Andrew Tridgell [Fri, 5 Mar 2010 00:53:19 +0000 (11:53 +1100)]
s4-python: only install external python libs that are missing
Andrew Tridgell [Fri, 5 Mar 2010 00:45:40 +0000 (11:45 +1100)]
s4-python: import a copy of the python dns library
This library is not installed on enough systems for us to rely
on it being available. We use the system copy if possible, and
fallback to this local copy
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Andrew Tridgell [Fri, 5 Mar 2010 00:45:10 +0000 (11:45 +1100)]
s4-dns: use samba.external to pull in the dns.resolver library
Andrew Tridgell [Fri, 5 Mar 2010 00:44:45 +0000 (11:44 +1100)]
s4-python: allow us to have samba copies of python libraries we depend on
For python libraries like dns.resolver it is useful to be able to install
a copy of the library with Samba. This set of functions allows us to do that
while using the locally installed version if it is available
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Andrew Tridgell [Thu, 4 Mar 2010 23:43:34 +0000 (10:43 +1100)]
s4-dns-ex: use autoclose on the dns child pipe
I'm hoping this will fix an occasional segfault I've noticed where
epoll still calls events on a closed fde
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Andrew Tridgell [Thu, 4 Mar 2010 23:42:41 +0000 (10:42 +1100)]
s4-messaging: use auto-close on the socket
Jeremy Allison [Thu, 4 Mar 2010 22:59:29 +0000 (14:59 -0800)]
srv_pipe.c doesn't reference current_user anymore. Remove it.
Jeremy.
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 21:18:10 +0000 (22:18 +0100)]
s4:auth/sam.c - change base context for the "tmp_ctx" context in "authsam_expand_nested_groups"
Better use the "res_sids_ctx" as base context for the "tmp_ctx" and not the
long-living "sam_ctx"/"ldb" context to prevent memory leaks.
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 16:54:45 +0000 (17:54 +0100)]
s4:ldap.py - give the "primaryGroupToken" test a better name
It tests also some other constructed attributes in a basic way.
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 16:51:09 +0000 (17:51 +0100)]
s4:ldap.py - add test for "tokenGroups"
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 15:28:03 +0000 (16:28 +0100)]
s4:operational LDB - don't accidentally "ate" search helper attributes if we need them for more constructed attributes
With this patch we delete the helper attributes at the end where all constructed
attributes have already been computed.
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 14:44:10 +0000 (15:44 +0100)]
s4:operational LDB module - make the counters unsigned
No need to have signed counters here.
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 12:58:16 +0000 (13:58 +0100)]
s4:operational LDB - implement the "tokenGroups" constructed attribute
It contains the transitive SID closure (expand member/memberOf attributes) of a
certain SAM object. The "tokenGroups" attribute never contains the SID of the
object itself.
References: http://msdn.microsoft.com/en-us/library/ms680275(VS.85).aspx,
http://support.microsoft.com/kb/301916,
MS-ADTS 3.1.1.4.5.19.
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 12:49:18 +0000 (13:49 +0100)]
s4:sam.c - make "authsam_expand_nested_groups" public
This is needed by the "tokenGroups" work in the operational LDB module.
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 12:48:17 +0000 (13:48 +0100)]
s4:sam.c - cosmetic indentation fix
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 12:46:34 +0000 (13:46 +0100)]
s4:sam.c - change variable types to unsigned in "sids_contains_sid"
Should also be unsigned - no need for a signed "i" and "num_sids" here.
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 13:28:04 +0000 (14:28 +0100)]
s4:operational LDB module - use right memory context int "construct_primary_group_token"
Use the "msg" as temporary context and not "ldb" which lives much longer.
Karolin Seeger [Thu, 4 Mar 2010 15:18:44 +0000 (16:18 +0100)]
Revert "s3:configure: add --enable-as-needed"
This reverts commit
22d316926b9589608d332143c1fa134229b75b3c.
Please see bug #7209 for details.
Nadezhda Ivanova [Thu, 4 Mar 2010 13:22:30 +0000 (15:22 +0200)]
Refactored ACL python tests
Made each type into a separate class to be easily run individually,
removed code duplication
Stefan Metzmacher [Thu, 4 Mar 2010 10:14:51 +0000 (11:14 +0100)]
s3:configure: add --enable-as-needed
On some broken systems like RHEL5, we need to be able
to disable --as-needed.
metze
Matthias Dieter Wallnöfer [Thu, 4 Mar 2010 09:29:33 +0000 (10:29 +0100)]
s4:provision - use the new "interface_ips" python call to detect the right host IPv4 address
Inform the user when there are more possibilities (so he can check for the
right address and otherwise he is able to do an immediate reprovision) and no
possibility at all (then we fall back to the loopback address "127.0.0.1" - this
is thought for testing purposes).
I think this should be enough for closing bug #5484.
Matthias Dieter Wallnöfer [Fri, 6 Nov 2009 19:14:41 +0000 (20:14 +0100)]
s4:ldif_handlers - Use "unsigned int" for counting purposes
I changed "uint32_t" to "unsigned int" since the LDB specification prescrives
"unsigned (int)" for counter variables (number of attributes,
number of values...).
Günther Deschner [Thu, 4 Mar 2010 00:35:33 +0000 (01:35 +0100)]
testprogs: add test_PrinterDataW.
Guenther
Günther Deschner [Thu, 4 Mar 2010 00:33:06 +0000 (01:33 +0100)]
testprogs: use dump_data in dump_printer_data.
Guenther
Günther Deschner [Thu, 4 Mar 2010 00:31:30 +0000 (01:31 +0100)]
testprogs: add print_printer_dataw and dump_data to printlib.
Guenther
Günther Deschner [Thu, 4 Mar 2010 00:29:16 +0000 (01:29 +0100)]
testprogs: add some multibyte versions of PrinterData calls.
Guenther
Bo Yang [Fri, 5 Mar 2010 17:59:55 +0000 (01:59 +0800)]
s3: Rerun genmsg after adding more strings.
Signed-off-by: Bo Yang <boyang@samba.org>
Bo Yang [Fri, 5 Mar 2010 17:53:13 +0000 (01:53 +0800)]
s3: Add i18n/l10n strings in pam_winbind.c coming from winbindd.
Signed-off-by: Bo Yang <boyang@samba.org>