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

152 Commits

Author SHA1 Message Date
Jeremy Allison
35f4ea221e Fix bug #6155 - "force group" is no longer working as expected.
We need to store the "force group" uid separately from the
conn->server_info token as we need to apply it separately also.
Volker PLEASE CHECK !
Jeremy.
2009-03-03 16:08:56 -08:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Stefan Metzmacher
0a0cd1396a s3:smbd: remove pointless static variable in uid.c
We always free the value at the end of the function,
so we don't need a static variable to hold just NULL
for the time the function isn't executed.

metze
2009-01-08 12:22:19 +01:00
Jeremy Allison
15e1fd7c54 Fix bug #1254 - write list not working under share-level security
A somewhat more elegant fix than I could use for 3.2.x or 3.0.x.
Turns out the only part of check_user_ok() that needs to change
for share level security is the VUID cache pieces, so I can just
always use check_user_ok() for all lp_security() cases.
Jeremy
2008-12-04 11:20:57 -08:00
Volker Lendecke
907f126d3e Get rid of pipes_struct->pipe_user, we have server_info now --- YESSS! 2008-11-24 11:39:03 +01:00
Jeremy Allison
d8df43e65d Fix bug #5900 reported by monyo@samba.gr.jp - vfs_readonly.so does not work.
Jeremy.
2008-11-17 14:13:20 -08:00
Jeremy Allison
8962be69c7 Make us clean under valgrind --leak-check=full by using talloc_autofree_context() instead of NULL.
Remove the code in memcache that does a TALLOC_FREE on stored pointers. That's a disaster waiting
to happen. If you're storing talloc'ed pointers, you can't know their lifecycle and they should
be deleted when their parent context is deleted, so freeing them at some arbitrary point later
will be a double-free.
Jeremy.
2008-11-06 20:48:13 -08:00
Volker Lendecke
40f5eab5eb Wrap the unix token info in a unix_user_token in auth_serversupplied_info
No functional change, this is a preparation for more current_user ref removal
(This used to be commit dcaedf345e)
2008-06-19 18:51:37 +02:00
Volker Lendecke
101162257c Move connection-specific vuid cache clear to uid.c
(This used to be commit 1025f68791)
2008-06-14 19:49:49 +02:00
Volker Lendecke
82d4806ce6 Slight refactoring for check_user_ok: It only needs vuid and server_info
(This used to be commit 68944ea1ea)
2008-06-14 19:49:49 +02:00
Volker Lendecke
ee6ee96af2 Group the access checks together in check_user_ok()
(This used to be commit 45662b5e8b)
2008-06-14 19:49:49 +02:00
Volker Lendecke
b935f4a2dc Consistently use snum in check_user_ok
Most already used it, these two still used SNUM(conn), where the only caller of
this routine (change_to_user) had set snum = SNUM(conn).
(This used to be commit b14e59bfdb)
2008-06-14 19:49:49 +02:00
Volker Lendecke
ad538bf0ab Compare the pointer "vuser" to NULL, not 0
(This used to be commit 5c916549f0)
2008-06-14 19:49:49 +02:00
Volker Lendecke
320fadd8fc Remove the reference to current_user_info from share_access.c
This required to pass around the domain a bit
(This used to be commit 17b0db20d2)
2008-05-25 11:43:57 +02:00
Volker Lendecke
aac9e7d1ca With force user, we have the same base token for all vuids
(This used to be commit 0f19bc3f65)
2008-05-11 00:25:27 +02:00
Volker Lendecke
53a623d8a6 Remove the unix token info from connection_struct
(This used to be commit 2834dacc8d)
2008-05-10 11:17:01 +02:00
Volker Lendecke
776caa081b Replace nt_user_token with server_info in connection_struct
(This used to be commit a3738aef59)
2008-05-10 11:17:01 +02:00
Volker Lendecke
0c2bf9521e Empty some nonempty blank lines
(This used to be commit 1a406def02)
2008-05-10 11:17:01 +02:00
Volker Lendecke
e2b9ac714b Make use of talloc_tos() in change_to_user()
(This used to be commit c4bed3a48b)
2008-05-10 11:17:00 +02:00
Volker Lendecke
c881c866d6 Next try at making the vuid cache circular
Jeremy, please check!
(This used to be commit a34f735217)
2008-05-10 11:17:00 +02:00
Volker Lendecke
89ac43d498 Remove some unused code
(This used to be commit 87383a4605)
2008-05-06 14:18:20 +02:00
Volker Lendecke
bec1dfab27 Remove "userdom_struct user" from "struct user_struct"
(This used to be commit 420de03523)
2008-05-05 18:28:59 +02:00
Volker Lendecke
c6d209f834 Remove the unix token info from "struct user_struct"
(This used to be commit aa2299d42a)
2008-05-05 18:28:58 +02:00
Volker Lendecke
bb3755968f Remove "nt_user_token" from "struct user_struct"
(This used to be commit 51d5d512f2)
2008-05-05 18:28:58 +02:00
Volker Lendecke
1a3f50559e Revert "Fix allocation of conn->vuid_cache entries"
This reverts commit 50c891d3df.

There's more to this code -- sorry for the spam
(This used to be commit 6e0e0cb8dd)
2008-05-05 15:07:01 +02:00
Volker Lendecke
8dd53811d5 Fix allocation of conn->vuid_cache entries
With the old code, if more than VUID_CACHE_SIZE elements were used all new
entries ended up in slot 0. With this checkin we do cycle.

Jeremy, please revert if the old behaviour was intentional
(This used to be commit 50c891d3df)
2008-05-05 14:46:03 +02:00
Volker Lendecke
c5356479c1 Some simplifications
(This used to be commit b59b436997)
2008-03-17 21:10:16 +01:00
Marc VanHeyningen
e06aa46b9f Coverity fixes
(This used to be commit 3fc85d2259)
2008-03-17 20:52:25 +01:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Gerald Carter
0e9210d0ea r22978: Don't use current_user to prep the security ctx in change_to_user
since any SID/uid/gid translation calls will reset the struct when
popping the security ctx.  This should fix the standalone server
configuration issues reported by David Rankin (thanks for the logs).
(This used to be commit 63cb25bad1)
2007-10-10 12:22:12 -05:00
Jeremy Allison
5b3d559aa8 r17295: Back out the become_root_uid_only change on the POSIX
acls code. I'm pretty sure this was safe, but become_root()
does other things to the token stack that become_root_uid_only()
does not, and as we're going into a vfs redirectred function
I decided it wasn't safe for now.
Jeremy.
(This used to be commit b3e0f45488)
2007-10-10 11:38:24 -05:00
Volker Lendecke
283b74fce5 r17096: Simplify share_access_check a bit: It takes the sharename instead of the snum,
and the decision which token to use (conn or vuser) does not really belong
here, it is better done in the two places where this is called.

Volker
(This used to be commit 0a138888ad)
2007-10-10 11:38:11 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Gerald Carter
fb5362c069 r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
(This used to be commit b65be8874a)
2007-10-10 11:10:14 -05:00
Gerald Carter
0af1500fc0 r13316: Let the carnage begin....
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed)
2007-10-10 11:06:23 -05:00
Jeremy Allison
d14af63e6a r13293: Rather a big patch I'm afraid, but this should fix bug #3347
by saving the UNIX token used to set a delete on close flag,
and using it when doing the delete. libsmbsharemodes.so still
needs updating to cope with this change.
Samba4 torture tests to follow.
Jeremy.
(This used to be commit 23f16cbc2e)
2007-10-10 11:06:21 -05:00
Gerald Carter
005c88054f r12916: use rpcstr_pull() instead of unistr_to_ascii() when validating share names
(This used to be commit c08bc30698)
2007-10-10 11:06:07 -05:00
Volker Lendecke
0a585102d6 r12312: Reformatting and a trivial change: is_share_read_only_for_user only uses
conn->service, so there's no point in passing down the whole conn struct.

Volker
(This used to be commit 39041297c7)
2007-10-10 11:05:53 -05:00
Jeremy Allison
fecdaec41c r6385: Convert checking of egid and secondary egid list into
iterator functions so it can be used easily in a for loop.
Drops duplicated code from posix_acls.c
Jeremy.
(This used to be commit 81f30bf598)
2007-10-10 10:56:39 -05:00
Günther Deschner
e091cd8148 r2016: Add message to ease access-control-debugging.
Guenther
(This used to be commit bc64bb0d20)
2007-10-10 10:52:28 -05:00
Volker Lendecke
5aadb88b53 r1375: When setting writable=yes in smb.conf and only allow read access in the
security descriptor, allow read access. The code failed in this case.

Jeremy, could you please cross-check this? The way I understood your code it
could only work if smb.conf and secdesc said the same. This made the use of
srvmgr a bit difficult.... What was your intention on how to use the
share_info.tdb?

The current code might check the secdesc twice, but I don't see any decent way
around it that does not completely clutter the code.

Volker
(This used to be commit 7c673bd910)
2007-10-10 10:52:08 -05:00
Jeremy Allison
49f95e6d27 r762: Fix for #1319 when security > share.
Jeremy.
(This used to be commit 9fe2240d6b)
2007-10-10 10:51:36 -05:00
Jeremy Allison
b545a8de0a Fixup the 'multiple-vuids' bugs.
Jeremy.
(This used to be commit f0f7a48327)
2004-02-13 19:05:25 +00:00
Andrew Bartlett
0f1dcf9839 nsswitch/winbindd_util.c:
add static

smbd/uid.c:
	remove unused function

Andrew Bartlett
(This used to be commit ab25af0e18)
2004-02-08 11:26:46 +00:00
Andrew Bartlett
ae2c8656b2 Samba hasn't used this function for ages - it's now handled deep in the
auth subsystem.

Andrew Bartlett
(This used to be commit 5693730594)
2004-02-08 07:17:30 +00:00
Gerald Carter
c2983f9323 Fix bug 327 (again and I think for the last time). Make sure that
pam_smbpass.so will load ok.  Had to move some functions around to work
around dependency problems (hence the new passdb/lookup_sid.c)

Also make sure that libsmbclient.a is built and installed when
we support shared libraries.
(This used to be commit 780055f442)
2003-08-27 20:52:56 +00:00
Tim Potter
74be920b0e Spelling.
(This used to be commit 7d009ebf66)
2003-08-06 01:14:51 +00:00
Gerald Carter
733f767b94 fix sid_to_[uid|gid] (spotted by Volker).
Still testing this, but I'm checking it in
so Volker can test it as well.  Should be right.
(This used to be commit 8edf193722)
2003-07-11 16:37:23 +00:00