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

18171 Commits

Author SHA1 Message Date
Volker Lendecke
e8e5c17f2e r20344: Move the calls to inherit_access_acls and change_owner_to_parent together.
Jeremy, I'm 100% sure you watch me closely here, I count on you :-)

Volker
(This used to be commit 02f85265f2)
2007-10-10 12:16:43 -05:00
Volker Lendecke
a67757ef9c r20343: Split change_owner_to_parent fd-based (for file opens) and a name-based (for
directory opens) routines.

Volker
(This used to be commit 4ca921d9aa)
2007-10-10 12:16:43 -05:00
Volker Lendecke
4e5a335c07 r20342: Move the lstat into mkdir_internal, for the FILE_OPEN case in open_directory
we want to follow symlinks.

Volker
(This used to be commit c20bdd219d)
2007-10-10 12:16:43 -05:00
Volker Lendecke
af1750934d r20340: Join vfs_MkDir to its only caller
(This used to be commit cce911780f)
2007-10-10 12:16:42 -05:00
Volker Lendecke
d0c6f9b728 r20339: Make mkdir_internal static to open.c
(This used to be commit 6dd0886b49)
2007-10-10 12:16:42 -05:00
Volker Lendecke
469b42c61f r20338: Restructure open_directory a bit. This gets rid of a race condition regarding
error messages: We relied upon a stat that a directory did not exist to later
on then do the mkdir or not. This does the mkdir directly and copes with a
potential error.

The second one is more important: It's possible with Samba 3 to do a
ntcreate&x with NTCREATEX_OPTIONS_DIRECTORY and we happily do a NT_STATUS_OK.

Also move up the use_nt_status() logic a bit. I think this does not belong
into the core routines, the smb server as such should take care of it.

Jeremy, do you think this should go to 3.0.24?

I'll update samba4torture when the build farm has picked up this checkin.

Volker
(This used to be commit 472fb11f49)
2007-10-10 12:16:42 -05:00
Volker Lendecke
57d11622b5 r20336: Fix some memleaks in trans2open and simplify trans2mkdir a bit: We now have
tmp_talloc_ctx().

Volker
(This used to be commit 165d28f03a)
2007-10-10 12:16:42 -05:00
Volker Lendecke
b596d6a111 r20335: Port oplock return logic from ntcreate&x to NT_TRANSACT_CREATE. Fixes parts of
raw-open.

Volker
(This used to be commit e4e766c092)
2007-10-10 12:16:42 -05:00
Volker Lendecke
81824507f6 r20334: Activate RAW-MKDIR
(This used to be commit 8f76914e01)
2007-10-10 12:16:41 -05:00
Volker Lendecke
fb93332b30 r20333: Fix a couple of Coverity errors in one run, this was a potential NULL dereference
(This used to be commit f9edfffeb5)
2007-10-10 12:16:41 -05:00
Jeremy Allison
c04b948750 r20330: And here's the fix for the parent winbindd crashing
after it's child died unexpectedly whilst the parent
was waiting for a reply. We need to clean up the request
we're not going to service, plus we still need to call
the continuation function with a "False" flag so it
can clean things up. Still testing this, but I think
I'm right.
Jeremy
(This used to be commit 9b04ac0c81)
2007-10-10 12:16:41 -05:00
Jeremy Allison
ad325a7905 r20329: Fix a winbindd crash bug. If someone pulls
the network cable out of the machine *exactly*
after the init_dc_connect() call in cm_connect_sam()
or cm_connect_lsa() call succeeded but before any
of the other calls fail, and they have debug level
10 set in the log, then we'd crash due to dereferencing
a now NULL pointer (conn->cli gets set to NULL when
the init_dc_connect() call called from cm_get_schannel_dcinfo()
fails). Yes, before you ask this *did* happen on a
customer site :-).
Jeremy.
(This used to be commit a0278a0cb0)
2007-10-10 12:16:41 -05:00
Volker Lendecke
6988778850 r20313: Make trans2_mkdir also go through open_directory for all the fancy inherit_acl
stuff & friends.

Survives raw-mkdir. I'll activate that tomorrow when all build farm machines
have picked up the changed samba4 torture test.

Volker
(This used to be commit 37e7a3f35f)
2007-10-10 12:16:41 -05:00
Volker Lendecke
f023f86709 r20312: Fix a memleak
(This used to be commit 20d3bc3549)
2007-10-10 12:16:40 -05:00
Volker Lendecke
f871861673 r20310: We've checked for EA's and support for them further up already.
Volker
(This used to be commit 9c00ce0bbc)
2007-10-10 12:16:40 -05:00
Günther Deschner
c1a05657b9 r20304: Smaller fixes for pam_winbind:
* fail on invalid credential flags in pam_sm_setcred
* parse config file for pam_sm_acct_mgmt and pam_sm_open_session

Guenther
(This used to be commit 2a428ac814)
2007-10-10 12:16:40 -05:00
Jeremy Allison
eeb14fcc94 r20296: If we're going to overwrite krb5.conf
only do it for our primary domain.
Jeremy.
(This used to be commit 61d31ce008)
2007-10-10 12:16:39 -05:00
Simo Sorce
c127486a84 r20290: Remove unused call
(This used to be commit 4920265c31)
2007-10-10 12:16:39 -05:00
Simo Sorce
ced5c1f9aa r20289: IDMAP is part of winbind but not the main process.
Make sure we route all request to remote DCs via the main process
so that IDMAP can correctly reuse DC connections and use the
async interface.

This fixes also idmap_nss so that it is able to resolve local
group names (requires patch on the samba dc earlier committed
to SAMBA_3_0 to make it resolve both the mapped and the unmapped
name).

Simo.
(This used to be commit 4297510f22)
2007-10-10 12:16:39 -05:00
Gerald Carter
8b0fce0b0c r20287: Allow a NULL sid when setting up the list of trusted domains.
(This used to be commit ccea7155bc)
2007-10-10 12:16:39 -05:00
Günther Deschner
bb9ca5025c r20279: Fix winbind segfault in winbindd_getsidaliases.
Jeremy: sidstr formerly could be NULL (when num_aliases was 0), since we
strdup here it needs to exist.

Guenther
(This used to be commit 29396a1bd8)
2007-10-10 12:16:39 -05:00
Günther Deschner
2d34900088 r20273: Map KRB5_KDCREP_SKEW to NT_STATUS_TIME_DIFFERENCE_AT_DC.
This gives much nicer error messages when failing to join due to clock
skew.

Guenther
(This used to be commit 5c5a761102)
2007-10-10 12:16:38 -05:00
Volker Lendecke
d6d17ea883 r20271: Fix the build
(This used to be commit c703d2ae1f)
2007-10-10 12:16:38 -05:00
Jeremy Allison
5d3456b22e r20270: Even with the dual daemon mode the parent winbindd
still needs to contact the DC's for non async requests
like enumerate users/groups etc. Now that online
DC detection is tied to async events we must enable
the processing of events in the main loop of winbindd.
Finally got rid of the last hard coded domain->initialized = 1
code in init_child_recv() - now all domain->initialized = True
gets done only in the connection manager code when either
we're online and have spoken to the DC or are offline and
we know we can't talk to the DC.
Jeremy.
(This used to be commit b3c98057fb)
2007-10-10 12:16:38 -05:00
Herb Lewis
e59e787b48 r20269: merge -r20264:20267 from SAMBA_3_0_24
more no previous prototype warnings
(This used to be commit 41be182f78)
2007-10-10 12:16:38 -05:00
Herb Lewis
84cd4d05e0 r20268: merge -r 20261:20263 from samba_3_0_24
get rid of previous prototype warnings
(This used to be commit 90265c83ff)
2007-10-10 12:16:38 -05:00
Volker Lendecke
9e41616b06 r20264: Two lines above this we just checked if (fsp->is_directory) ...
(This used to be commit 88ab54b3b7)
2007-10-10 12:16:37 -05:00
Herb Lewis
55ed1d5945 r20261: merge 20260 from samba_3_0_24
clean up a bunch of no previous prototype warnings
(This used to be commit c60687db11)
2007-10-10 12:16:37 -05:00
Volker Lendecke
920e1a3685 r20257: Hey, change_owner_to_parent is now static :-)
(This used to be commit 4090bc4bca)
2007-10-10 12:16:37 -05:00
Volker Lendecke
bc3787ab6e r20255: Activate BASE-SAMBA3ERROR in the build farm
(This used to be commit 7e0005c14b)
2007-10-10 12:16:37 -05:00
Günther Deschner
bd7b2c76f3 r20254: The pam_chauthtok needs to go through the async interface as well.
This fixes pam password changes in the online case.

Guenther
(This used to be commit 2d2de1ac27)
2007-10-10 12:16:37 -05:00
Volker Lendecke
f4f1814f8c r20253: Reduce some code duplication, make reply_mkdir go through the same code paths
ncreate does. This is a bit slower (about 10-20%), because it goes touches the
share mode db, but I think not having to call change_owner_to_parent and
friends in fewer places outweighs this. And, mkdir is not the way current
Windows boxes create directories, they do it via the ncreate call.

Volker
(This used to be commit ddae494fbe)
2007-10-10 12:16:37 -05:00
Simo Sorce
03b1445450 r20252: Revert back to const, but I have a fleble feeling we should go the ther way.
(This used to be commit 2048d49150)
2007-10-10 12:16:36 -05:00
Jeremy Allison
5115931024 r20250: If we've come from being globally offline we
don't have a check online event handler set.
We need to add one once we're been asked to
go back online as this is the only way to actually
go into the online state. Doh ! :-).
Jeremy.
(This used to be commit 5d36c4e031)
2007-10-10 12:16:36 -05:00
Günther Deschner
fb6d54dbab r20249: Fail when parsing invalid options in _pam_parse.
Guenther
(This used to be commit f6c9421abd)
2007-10-10 12:16:36 -05:00
Herb Lewis
911413e7d7 r20248: merge 20247 from samba_3_0_24
get rid of warning: value computed is not used
(This used to be commit ebe16589cb)
2007-10-10 12:16:36 -05:00
Herb Lewis
ef4c2088c5 r20245: merge 20244 from samba_3_0_24
get rid of more nested extern declarations warnings
(This used to be commit e9df051f52)
2007-10-10 12:16:36 -05:00
Simo Sorce
91626a4497 r20243: Make lookup_name resolve both the mapped and the real unix group name
(This used to be commit 7167e7b26a)
2007-10-10 12:16:35 -05:00
Simo Sorce
bb3cf31184 r20242: these are not really const as we set them in the function
(This used to be commit 6a0260fb04)
2007-10-10 12:16:35 -05:00
Günther Deschner
9291e634c0 r20241: Slightly improve readability of the pam_vsyslog replacement function.
Guenther
(This used to be commit 222320373f)
2007-10-10 12:16:35 -05:00
Günther Deschner
619671a718 r20240: Be a little more verbose about the credential flags when the debug flag
is set.

Guenther
(This used to be commit ecbab58826)
2007-10-10 12:16:35 -05:00
Günther Deschner
6fdbdfc86f r20239: Parse the configfile for pam_sm_setcred as well
(e.g. to get the debug flag)

Guenther
(This used to be commit 2c549f71f1)
2007-10-10 12:16:35 -05:00
James Peach
5bb49b08f3 r20237: Replace exit_server with exit_server_cleanly where appropriate. All
send_smb failures should be clean exits. All times when we exit as
a matter of policy should also be clean exits.
(This used to be commit d6382092e7)
2007-10-10 12:16:34 -05:00
James Peach
7d4449ffa0 r20235: Don't use realloc directly.
(This used to be commit 91e90f3bc4)
2007-10-10 12:16:34 -05:00
Volker Lendecke
0379e088dc r20229: Avoid a silly function call in mkdir_internal. None of the callers look at
errno, all go straight to ERROR_NT(status).

Volker
(This used to be commit 9d8b48c0ef)
2007-10-10 12:16:34 -05:00
Volker Lendecke
9933b596d1 r20228: Bring the calling conventions of inherit_access_acl and change_owner_to_parent
a bit closer together: Move the lp_inherit_perms() check into the callers.

Volker
(This used to be commit 0874093e5f)
2007-10-10 12:16:34 -05:00
Volker Lendecke
771f595693 r20227: Simplify logic in vfs_MkDir() a bit
(This used to be commit b24cf79e9e)
2007-10-10 12:16:33 -05:00
Volker Lendecke
f5b3bed84f r20218: Same fix as r20217 -- can we consolidate that duplicated code a bit?
(This used to be commit fdb310f579)
2007-10-10 12:16:33 -05:00
Volker Lendecke
34a0885df0 r20217: uid_t and gid_t are not necessarily 32 bit. In assignments we get an automatic
conversion, but not when we pass pointers down to other functions.

Simo, please check.

Volker
(This used to be commit 04845f600b)
2007-10-10 12:16:33 -05:00
Simo Sorce
b1de1a6eab r20216: Fix fallback code.
A reversed check made it impossile to fallback to the Unix Domain mapping code.
Also fix a potential use of a freed array.

Jerry,
my tests shows that this code now correctly handle the fallback to Unix Domain
when our Domain member is asked for a mapped group that has a unix name different
from the Windows name against a Samba DC and we do not use winbindd but share
users/groups by other means (ldap / sync of passwd and group files)

Immediate Fix would be to discuss if we should answer back when DOMAIN\unixgroup -> SID
is asked for, in the case the unixgroup name is mapped to a different name.
IE: DOMAIN\Domain Admins -> ntadmins

Currently if we are asked for "DOMAIN\Domain Admins" we return the dom admins SID
If we are asked for "DOMAIN\ntadmins we return "not found", but we may consider to
return the Domain admins SID in this case too.

Comments are welcome on this point!

Long term fix I think is the unixinfo pipe and of course an idmap_unixinfo moudle.

Simo.
(This used to be commit 07bdbb4c21)
2007-10-10 12:16:33 -05:00