1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

605 Commits

Author SHA1 Message Date
Gerald Carter
0298a3466b r17736: Apply the Unix group patch when creating the token for a
username map.
2007-10-10 11:38:47 -05:00
Gerald Carter
3848199287 r17710: Thanks to Thomas Bork for testing and continued feedback on this.
Comments from the patch:

/* Add the "Unix Group" SID for each gid to catch mapped groups
   and their Unix equivalent.  This is to solve the backwards
   compatibility problem of 'valid users = +ntadmin' where
   ntadmin has been paired with "Domain Admins" in the group
   mapping table.  Otherwise smb.conf would need to be changed
   to 'valid user = "Domain Admins"'.  --jerry */
2007-10-10 11:38:46 -05:00
Volker Lendecke
09e7c010f0 r17626: Some C++ Warnings 2007-10-10 11:38:44 -05:00
Volker Lendecke
f6194cf4b2 r17584: Some C++ Warnings 2007-10-10 11:38:41 -05:00
Volker Lendecke
fd6e3f133b r17573: Fix typo 2007-10-10 11:38:40 -05:00
Volker Lendecke
94817a8ef5 r17571: Change the return code of cli_session_setup from BOOL to NTSTATUS
Volker
2007-10-10 11:38:39 -05:00
Jeremy Allison
1e1fcb5eb2 r17402: Added lookup_name_smbconf() to be called when looking
up names from smb.conf. If the name is unqualified it
causes the lookup to be done in WORKGROUP\name, then
"Unix [users|groups]"\name rather than searching the
domain. Should fix the problems with "force user"
selecting a domain user by preference.
Jeremy.
2007-10-10 11:38:31 -05:00
Volker Lendecke
d12b08fc61 r17399: Some C++ warnings 2007-10-10 11:38:31 -05:00
Jeremy Allison
16ebccbc58 r17393: Remove Volker's ASSERT that num_groupsids > 0.
For guest connection they may well be zero.
This should fix up the buildfarm (fingers
crossed).
Jeremy.
2007-10-10 11:38:31 -05:00
Jeremy Allison
6d822b8567 r17392: Commit Volker's fix for the valid users problem.
Let's look at the build farm now... :-).
Jeremy.
2007-10-10 11:38:31 -05:00
Jeremy Allison
65003e1b25 r17391: Revert the second part of the valid users fix - the
netlogon code uses pdb_get_group_sid() which could
return a S-1-1-22 unix sid. Who knew.... :-(.
I'm going to test Volker's fix instead. Once
3.0.23b is out we *have* to rip out the pdb_set_group_sid()
code....
Jeremy.
2007-10-10 11:38:31 -05:00
Jeremy Allison
79b1e668e2 r17388: Fix the "valid users"/token issue for now. Volker,
please come in and fix it in a less ugly way once
you have some time. Thanks,
Jeremy.
2007-10-10 11:38:30 -05:00
Jeremy Allison
0b5b2b53ec r17378: Fix the issues people have been having with mapped
users (username map) and failure to connect to a
share. Essentially, even on a standalone system
we were going into the create_token_from_username()
code (I think by mistake) if the username was mapped.
Fixes bug #3991.

Volker & Jerry - please go over this with a very careful eye
and let me know if this isn't correct (I think it is,
but this isn't my code and it's a dangerous area for
me to be playing in :-).

Jeremy
2007-10-10 11:38:29 -05:00
Volker Lendecke
19d0269000 r17022: Fix the build farm -- maybe this is the real fix, testing more 2007-10-10 11:19:20 -05:00
Volker Lendecke
f6e3ee147f r17016: Different and smaller fix for the valid users = username problem.
If no winbind is around, the best we can do to get the user's token correct is
to ask unix via create_token_from_username. More investigation is needed if
this also fixes the +groupname for unmapped groups problems more cleanly.

Volker
2007-10-10 11:19:20 -05:00
Volker Lendecke
7a629118ee r17011: Back out r17010 after talking to Jerry. Another fix pending...
Volker
2007-10-10 11:19:19 -05:00
Volker Lendecke
5e07ab750a r17010: If winbind is not around, add S-1-22-1-<uid> to the user's token.
See the comment in the patch for the reason.

Volker
2007-10-10 11:19:19 -05:00
Jeremy Allison
9dafb7f48c 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.
2007-10-10 11:19:14 -05:00
Volker Lendecke
9ec5ccfe85 r16865: This is a proposal to fix bug 3915. Before sending patches around, this is
what svn is for.

The idea is that we fall back to a pure unix user with S-1-22 SIDs in the
token in case anything weird is going on with the 'force user'.

Volker
2007-10-10 11:19:12 -05:00
Volker Lendecke
dc403cec88 r16864: Intermediate checkin -- swap the sid_check_is_in_unix_users and
sid_check_is_in_our_domain cases.

Volker
2007-10-10 11:19:12 -05:00
Volker Lendecke
03c665c307 r16766: A warning found by RHEL3. This might actually be 3.0.23 code, maybe there are
vasprintf implementations that don't like a NULL format.

Volker
2007-10-10 11:19:10 -05:00
Gerald Carter
fa477969fb r16749: BUG 3905: don't fail in create_local_nt_token() when a
checking for the builtin Administrators group membership.
security = server has no domain info in secrets.tdb
2007-10-10 11:19:09 -05:00
Jeremy Allison
6b39f53e43 r16632: Fix bug #3882 reported by jason@ncac.gwu.edu.
Jeremy.
2007-10-10 11:19:04 -05:00
Gerald Carter
ce7846d6f1 r16471: Bug reported by Vitaly Protsko <villy@sft.ru> in 3.0.23rc1.
Add missing automatic add of the Administrators SID in the absence
of winbindd and precense of Domain Admins SID in the user's token.
2007-10-10 11:18:55 -05:00
Jeremy Allison
a0d368197d r16241: Fix Klocwork #106 and others like it.
Make 2 important changes. pdb_get_methods()
returning NULL is a *fatal* error. Don't try
and cope with it just call smb_panic. This
removes a *lot* of pointless "if (!pdb)" handling
code. Secondly, ensure that if samu_init()
fails we *always* back out of a function. That
way we are never in a situation where the pdb_XXX()
functions need to start with a "if (sampass)"
test - this was just bad design, not defensive
programming.
Jeremy.
2007-10-10 11:17:27 -05:00
Jeremy Allison
6c61dc8ed6 r16230: Fix Klocwork #861 and others. localtime and asctime
can return NULL. Ensure we check all returns correctly.
Jeremy.
2007-10-10 11:17:26 -05:00
Jeremy Allison
79e693798c r16209: Klocwork bug #66, ensure no null deref.
Jeremy.
2007-10-10 11:17:25 -05:00
Volker Lendecke
07c5dcb863 r16204: Fix Klocwork # 14
localtime() can return NULL.

Volker
2007-10-10 11:17:25 -05:00
Volker Lendecke
3159bd3a4e r16150: Fix possible NULL dereference found by Klocwork ID # 17 2007-10-10 11:17:22 -05:00
Volker Lendecke
a1fcacf756 r16141: Dummy commit to make the build farm re-test against Samba4 16140 2007-10-10 11:17:22 -05:00
Jeremy Allison
5cd234a1ff r16076: Fix for machine password timeout overflow from Shlomi Yaakobovich
<Shlomi@exanet.com>.
Jeremy.
2007-10-10 11:17:19 -05:00
Jeremy Allison
ff3fe39b83 r15676: Fix meaningless debug statement from uninitialized variable.
Spotted by "John E. Malmberg" <wb8tyw@qsl.net>.
Jeremy.
2007-10-10 11:17:06 -05:00
Volker Lendecke
6071dd5db0 r15600: Correctly fill in the gid for local users.
Volker
2007-10-10 11:17:02 -05:00
Gerald Carter
d19dad8815 r15549: removing rhosts and 'hosts equiv' authentication features 2007-10-10 11:16:58 -05:00
Volker Lendecke
293b89dfb1 r15476: Transfer the was_mapped flag from user_info to server_info also in auth_sam
and auth_domain. Thanks for Simo to point this out.

Volker
2007-10-10 11:16:52 -05:00
Volker Lendecke
2765c4ff8d r15475: Ugly and disgusting patch to fix the username map problem I created by
changing the token generation. I *hate* this code!

Jerry, you have been looking at this as well, can you double-check that I did
not screw it up?

Thanks,

Volker
2007-10-10 11:16:52 -05:00
Volker Lendecke
d2f39ae7fe r15472: Remove an unused function parameter 2007-10-10 11:16:52 -05:00
Gerald Carter
7433dba78b r15393: remove extra call to fallback user creation on member servers; it's handled by the smb_getpwnam() call deeper in 2007-10-10 11:16:39 -05:00
Paul Green
e1bd357fe8 r15368: Remove some dead code. -- paulg 2007-10-10 11:16:37 -05:00
Paul Green
2270a5196d r15285: Fix the build. 2007-10-10 11:16:31 -05:00
Paul Green
17774387ad r15283: Oh yeah. The build farm doesn't do much with head. OK, here is the patch to SAMBA_3_0 to declare prototypes for the initialization functions. These are the same changes I just made to head. --paulg 2007-10-10 11:16:31 -05:00
Jeremy Allison
8272a5ab06 r15088: Remove all time() and gettimeofday() calls out of the mainline
packet processing code. Only do these when needed (ie. in the
idle timeout code). We drop an unneccessary global here too.
Jeremy.
2007-10-10 11:16:22 -05:00
Gerald Carter
77fb19c45d r15086: Get defensive about creating user accounts when winbindd
fails (but is present).
2007-10-10 11:16:22 -05:00
Gerald Carter
a95d11345e r15053: fix portabilities issues between 32-bit winbind clients and a 64-bit winbindd server 2007-10-10 11:16:00 -05:00
Gerald Carter
db1162241f r14634: Many bug fixes thanks to train rides and overnight stays in airports
* Finally fix parsing idmap uid/gid ranges not to break with spaces
  surrounding the '-'
* Allow local groups to renamed by adding info level 2 to
  _samr_set_aliasinfo()
* Fix parsing bug in _samr_del_dom_alias() reply
* Prevent root from being deleted via Samba
* Prevent builting groups from being renamed or deleted
* Fix bug in pdb_tdb that broke renaming user accounts
* Make sure winbindd is running when trying to create the Administrators
  and Users BUILTIN groups automatically from smbd (and not just check the
  winbind nexted groups parameter value).
* Have the top level rid allocator verify that the RID it is about to
  grant is not already assigned in our own SAM (retries up to 250 times).
  This fixes passdb with existing SIDs assigned to users from the RID algorithm
  but not monotonically allocating the RIDs from passdb.
2007-10-10 11:15:41 -05:00
Gerald Carter
ddad66ec58 r14578: fix incorrect comment in fill_sam_account(). This function is called from multiple places now (krb5, winbindd auth and domain_client_validate() 2007-10-10 11:15:37 -05:00
Gerald Carter
f54d911e68 r14421: This does two things
* Automatically creates the BUILTIN\Users group similar to
  how BUILTIN\Administrators is done.  This code does need to
  be cleaned up considerably.  I'll continue to work on this.

* The important fix is for getusergroups() when dealing with a
  local user and nested groups.  Now I can run the following
  successfully:

    $ su - jerry -c groups
    users BUILTIN\users
2007-10-10 11:15:29 -05:00
Gerald Carter
612979476a r14403: * modifies create_local_nt_token() to create a BUILTIN\Administrators
group IFF sid_to_gid(S-1-5-32-544) fails and 'winbind nested groups = yes'

* Add a SID domain to the group mapping enumeration passdb call
  to fix the checks for local and builtin groups.  The SID can be
  NULL if you want the old semantics for internal maintenance.
  I only updated the tdb group mapping code.

* remove any group mapping from the tdb that have a
  gid of -1 for better consistency with pdb_ldap.c.
  The fixes the problem with calling add_group_map() in
  the tdb code for unmapped groups which might have had
  a record present.

* Ensure that we distinguish between groups in the
  BUILTIN and local machine domains via getgrnam()
  Other wise BUILTIN\Administrators & SERVER\Administrators
  would resolve to the same gid.

* Doesn't strip the global_sam_name() from groups in the
  local machine's domain (this is required to work with
  'winbind default domain' code)

Still todo.

* Fix fallback Administrators membership for root and domain Admins
  if nested groups = no or winbindd is not running

* issues with "su - user -c 'groups'" command

* There are a few outstanding issues with BUILTIN\Users that
  Windows apparently tends to assume.  I worked around this
  presently with a manual group mapping but I do not think
  this is a good solution.  So I'll probably add some similar
  as I did for Administrators.
2007-10-10 11:15:28 -05:00
Günther Deschner
773e33c971 r14130: Remove make_server_info_pac alltogether, make_server_info_info3 does
already do what we need.

Guenther
2007-10-10 11:11:14 -05:00
Günther Deschner
1280d79111 r14129: Add the group sids from the Kerberos PAC to the user token.
Guenther
2007-10-10 11:11:14 -05:00