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

59987 Commits

Author SHA1 Message Date
Andrew Tridgell
f3c738f819 replace: added get_current_dir_name() 2010-03-05 23:07:32 +11:00
Andrew Tridgell
ace6d75ae6 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>
2010-03-05 23:07:31 +11:00
Andrew Tridgell
034bcaf14d 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>
2010-03-05 23:07:31 +11:00
Andrew Tridgell
edd5a572d8 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>
2010-03-05 23:07:31 +11:00
Andrew Tridgell
ee4ae0e7ad 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>
2010-03-05 23:07:31 +11:00
Günther Deschner
6c52a37ac1 s3-selftest: enable RPC-WINREG against Samba 3.
Guenther
2010-03-05 11:09:05 +01:00
Günther Deschner
b3765afd38 s4-smbtorture: skip NotifyChangeKeyValue test against s3 for now.
Guenther
2010-03-05 11:09:05 +01:00
Matthias Dieter Wallnöfer
12ae05939f 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.
2010-03-05 08:55:47 +01:00
Matthias Dieter Wallnöfer
ce82f91614 s4:torture/rpc/samr.c - make some argument of function "test_SamLogon_with_creds" constant
This to quiet warnings.
2010-03-05 08:55:47 +01:00
Matthias Dieter Wallnöfer
bfd31db9a9 s4:torture/winbind/struct_based.c - fix up (un)signedness of a function argument
Otherwise always a warning is generated.
2010-03-05 08:55:47 +01:00
Andrew Tridgell
2e1637833b 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>
2010-03-05 16:12:06 +11:00
Andrew Tridgell
80a37beb53 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
2010-03-05 16:12:05 +11:00
Andrew Tridgell
f01f124969 s4-rpc: don't use s->credentials after it is freed 2010-03-05 16:12:05 +11:00
Andrew Tridgell
2e1e446ba3 s4-torture: fixed commas separating C statements 2010-03-05 16:12:05 +11:00
Bo Yang
aaafadb7d5 s3: Fix unnecessary traversing winbindd_cache.tdb in SIGHUP handler.
Signed-off-by: Bo Yang <boyang@samba.org>
2010-03-06 20:58:23 +08:00
Andrew Tridgell
25a0750b81 s4-python: only install external python libs that are missing 2010-03-05 11:54:37 +11:00
Andrew Tridgell
7d86257d54 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>
2010-03-05 11:54:36 +11:00
Andrew Tridgell
f3ca7a4696 s4-dns: use samba.external to pull in the dns.resolver library 2010-03-05 11:54:36 +11:00
Andrew Tridgell
8c7cf499ab 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>
2010-03-05 11:54:36 +11:00
Andrew Tridgell
2d30f4fb4f 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>
2010-03-05 11:54:36 +11:00
Andrew Tridgell
5573d04941 s4-messaging: use auto-close on the socket 2010-03-05 11:54:36 +11:00
Jeremy Allison
cb06eee86a srv_pipe.c doesn't reference current_user anymore. Remove it.
Jeremy.
2010-03-04 14:59:29 -08:00
Matthias Dieter Wallnöfer
13b1bf5d47 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.
2010-03-04 22:18:10 +01:00
Matthias Dieter Wallnöfer
3d94b28441 s4:ldap.py - give the "primaryGroupToken" test a better name
It tests also some other constructed attributes in a basic way.
2010-03-04 18:16:24 +01:00
Matthias Dieter Wallnöfer
4546b6b7df s4:ldap.py - add test for "tokenGroups" 2010-03-04 18:16:24 +01:00
Matthias Dieter Wallnöfer
8297302e98 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.
2010-03-04 18:16:24 +01:00
Matthias Dieter Wallnöfer
ffa03820f1 s4:operational LDB module - make the counters unsigned
No need to have signed counters here.
2010-03-04 18:16:23 +01:00
Matthias Dieter Wallnöfer
bf94d68df8 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.
2010-03-04 18:16:23 +01:00
Matthias Dieter Wallnöfer
1f371cdbe5 s4:sam.c - make "authsam_expand_nested_groups" public
This is needed by the "tokenGroups" work in the operational LDB module.
2010-03-04 18:16:22 +01:00
Matthias Dieter Wallnöfer
7587665d92 s4:sam.c - cosmetic indentation fix 2010-03-04 18:16:22 +01:00
Matthias Dieter Wallnöfer
0049c9ed1c 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.
2010-03-04 18:16:22 +01:00
Matthias Dieter Wallnöfer
e34ee26169 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.
2010-03-04 18:16:21 +01:00
Karolin Seeger
bc2ff7abc9 Revert "s3:configure: add --enable-as-needed"
This reverts commit 22d316926b.

Please see bug #7209 for details.
2010-03-04 16:19:33 +01:00
Nadezhda Ivanova
8cb416a0b5 Refactored ACL python tests
Made each type into a separate class to be easily run individually,
removed code duplication
2010-03-04 15:22:30 +02:00
Stefan Metzmacher
22d316926b s3:configure: add --enable-as-needed
On some broken systems like RHEL5, we need to be able
to disable --as-needed.

metze
2010-03-04 13:02:16 +01:00
Matthias Dieter Wallnöfer
af6f59468a 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.
2010-03-04 10:38:36 +01:00
Matthias Dieter Wallnöfer
8a8c2de29f 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...).
2010-03-04 10:38:31 +01:00
Günther Deschner
a319eb9700 testprogs: add test_PrinterDataW.
Guenther
2010-03-04 10:10:02 +01:00
Günther Deschner
55946ddd1d testprogs: use dump_data in dump_printer_data.
Guenther
2010-03-04 10:10:02 +01:00
Günther Deschner
74ba0b7189 testprogs: add print_printer_dataw and dump_data to printlib.
Guenther
2010-03-04 10:10:02 +01:00
Günther Deschner
66b4463fc1 testprogs: add some multibyte versions of PrinterData calls.
Guenther
2010-03-04 10:10:02 +01:00
Bo Yang
6384f45f52 s3: Rerun genmsg after adding more strings.
Signed-off-by: Bo Yang <boyang@samba.org>
2010-03-06 01:59:55 +08:00
Bo Yang
ef0b4e4687 s3: Add i18n/l10n strings in pam_winbind.c coming from winbindd.
Signed-off-by: Bo Yang <boyang@samba.org>
2010-03-06 01:53:13 +08:00
Matthias Dieter Wallnöfer
fd00867e85 s4:samdb.c - Make it signed-safe
Use an unsigned argument for the numbers of groups and the counter "i" since
the function is called only by "auth_generate_session_info" with an unsigned
number of groups argument.
2010-03-03 20:15:25 +01:00
Matthias Dieter Wallnöfer
6a1a7ce9eb s4:srvsvc RPC - "srvsvc_create_ntvfs_connect"
Previous commit was incomplete. The "service" parameter in the "tcon" structure
should point to "scfg->name". I'm not sure if "share" is right but the first
was used before commit f390daef47.
2010-03-03 20:15:25 +01:00
Matthias Dieter Wallnöfer
9b4d208ce8 s4:srvsvc RPC - fix up the "ntvfs_connect" in "srvsvc_create_ntvfs_connect"
This should be the right fix (set the service name in the tcon union to the
share name/path). That should be the solution for bug #6784.
2010-03-03 18:43:23 +01:00
Matthias Dieter Wallnöfer
a21b49bb38 s4:torture/rpc/samr - Fix up SAMR-USERS test
"QueryDomainInfo" returns only global groups, "QueryDisplayInfo" also universal
ones. Consider MS-SAMR 3.1.5.5.1.1 and 3.1.5.3.1.
2010-03-03 17:45:58 +01:00
Matthias Dieter Wallnöfer
051eb0b575 s4:torture/rpc/samr - enhance the "EnumDomainGroups" test regarding universal groups
Find the "Enterprise Admins" group which does exist on s4 and Windows
directories and is always per default universal. Test this only when the target
is set to s4 (s3 deployments don't contain this group). If the number of
returned objects is "0" (count) then we are likely testing the builtin domain of
an AD deployment.Then we ignore the inexistent "Enterprise Admins" group.

I didn't enhance the test for "QueryDomainInfo" since this does itself a
comparison of all returned objects with the "EnumDomainGroups" call. Therefore
if the latter passes, and the "QueryDomainInfo" test passes also the
"QueryDomainInfo" call is okay regarding groups.
2010-03-03 17:20:01 +01:00
Matthias Dieter Wallnöfer
8d0fbfe987 s4:dcesrv_samr - Also "OpenGroup" needs to support universal groups 2010-03-03 17:15:31 +01:00
Matthias Dieter Wallnöfer
f92c28bf4e s4:dcesrv_samr - Fix up "EnumDomainGroups" and "QueryDisplayInfo" calls
We need to look for both global and universal group types when querying them.
Found by ekacnet (http://lists.samba.org/archive/samba-technical/2010-March/069777.html).
2010-03-03 17:15:31 +01:00