1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-23 11:17:06 +03:00

41 Commits

Author SHA1 Message Date
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
Tim Potter
48cd81074e r13648: Duh. 2007-10-10 11:10:21 -05:00
Volker Lendecke
bb40e544de r13494: Merge the stuff I've done in head the last days.
Volker
2007-10-10 11:10:06 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Lars Müller
f650e3bdaf r12986: Use d_fprintf(stderr, ...) for any error message in net.
All 'usage' messages are still printed to stdout.

Fix some compiler warnings for system() calls where we didn't used the
return code.  Add appropriate error messages and return with the error
code we got from system() or NT_STATUS_UNSUCCESSFUL.
2007-10-10 11:06:09 -05:00
Volker Lendecke
d1e8f9afff r12185: Cosmetic cleanup 2007-10-10 11:05:48 -05:00
Volker Lendecke
81c358b511 r12182: Cosmetic cleanup 2007-10-10 11:05:48 -05:00
Volker Lendecke
8a7d6eb2c0 r12129: Fix uninitialized variables.
Volker
2007-10-10 11:05:46 -05:00
Jeremy Allison
d720867a78 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
2007-10-10 11:05:02 -05:00
Gerald Carter
9727d05241 r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1 2007-10-10 10:57:02 -05:00
Gerald Carter
c71f20f1ae r6706: * fix bug that prevented smbclient from creating directories
on non-dfs paths
* add patch from James Peach to remove use of uninitialized
  variables
2007-10-10 10:56:52 -05:00
Volker Lendecke
3a67865169 r6080: Port some of the non-critical changes from HEAD to 3_0. The main one is the
change in pdb_enum_alias_memberships to match samr.idl a bit closer.

Volker
2007-10-10 10:56:20 -05:00
John Terpstra
0d38d5f610 r5918: Fix typo. 2007-10-10 10:56:08 -05:00
Günther Deschner
2556e6570e r5234: Do not use the "Local Unix Group"-default description for all kinds of
group-mappings.

Guenther
2007-10-10 10:55:34 -05:00
Günther Deschner
0760d07b4c r4285: Allow -v or -l for displaying verbose groupmap-listing as well as
"verbose".

Guenther
2007-10-10 10:53:41 -05:00
Volker Lendecke
2508d4ed1e r3566: Completely replace the queryuseraliases call. The previous implementation does
not exactly match what you would expect.

XP workstations during login actually do this, so we should better become a
bit more correct. The LDAP query issued is not really fully optimal, but it is
a lot faster and more correct than what was there before. The change in
passdb.h makes it possible that queryuseraliases is done with a single ldap
query.

Volker
2007-10-10 10:53:09 -05:00
Tim Potter
7f161702fa r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of
'..' from all #include preprocessor commands.   This fixes bugzilla #1880
where OpenVMS gets confused about the '.' characters.
2007-10-10 10:52:55 -05:00
Günther Deschner
3677c6a8f6 r1720: Show correct help for net groupmap commands.
Guenther
2007-10-10 10:52:19 -05:00
Gerald Carter
b393469d95 r116: volker's patch for local group and group nesting 2007-10-10 10:51:10 -05:00
Volker Lendecke
eb4d4faff8 Implement 'net groupmap set' and 'net groupmap cleanup'.
I was rather annoyed by the net groupmap syntax, I could never get it
right.

net groupmap set "domain admins" domadm

creates a mapping,

net groupmap set "domain admins" -C "Comment" -N "newntname"

should also do what you expect. I'd like to have some feedback on the usability
of this.

net groupmap cleanup

solves a problem I've had two times now: Our SID changed, and a user's primary
group was mapped to a SID that is not ours. net groupmap cleanup removes all
mappings that are not from our domain sid.

Volker
-
Volker Lendecke
19b30334a7 Fix success message for net groupmap modify
Volker
-
Gerald Carter
e1fac713e2 fix some warnings found by the Sun C compiler -
Jeremy Allison
c8bfde5be9 Fix from gregory@networksentry.co.za, don't clobber the comment if it
exists.
Jeremy.
-
Tim Potter
bc8a181477 Fix error message when calling namedtogid() fails adding a group map
entry.  Bug #431.
-
Volker Lendecke
3aed9c8a4a Don't ask, it's too embarrassing :-)
Actually let the user explicitly specify a rid...

Volker
-
Volker Lendecke
7ce94d39ad When doing 'net groupmap add', default to algorithmic mapping for the rid.
Volker
-
Volker Lendecke
517bb4d0df Fix memleak -
Andrew Bartlett
b7760faedc (fixing bug in my last commit)
This isn't C++ - start your code *after* all the variables are declared...

Andrew Bartlett
-
Andrew Bartlett
477f2d9e39 This removes the StrCaseCmp() stuff from 'net idmap' and 'net
groupmap'.  The correct way to implement this stuff is via a function
table, as exampled in all the other parts of 'net'.

This also moves the idmap code into a new file.  Volker, is this your
code?  You might want to put your name on it.

Andrew Bartlett
-
Simo Sorce
e341e7c49f Ok, this patch removes the privilege stuff we had in, unused, for some time.
The code was nice, but put in the wrong place (group mapping) and not
supported by most of the code, thus useless.

We will put back most of the code when our infrastructure will be changed
so that privileges actually really make sense to be set.

This is a first patch of a set to enhance all our mapping code cleaness and
stability towards a sane next beta for 3.0 code base

Simo.
-
Jeremy Allison
43ca4b8a84 Patch from "Alex Deiter" <tiamat@komi.mts.ru> to fix incorrect error check.
Jeremy.
-
Gerald Carter
82f024723c fix and if () that should be an 'else if()' -
Gerald Carter
d9277bd064 groupmap delet should take a name or a SID -
Gerald Carter
fdacad185c allow the unix group in a mapping to be changed; doesn't work with LDAP right now but should be ok with tdb's -
Gerald Carter
541f40a144 don't reset the group type unless specified -
Gerald Carter
665d21b865 default new groups to domain groups -
Gerald Carter
b6ccdb8f7b support referencing group by sid in all operations; allow group name to be changed -
Gerald Carter
43942398af removing some ifdef'd out code -
Jeremy Allison
1e5fe87d75 Fixup a few typos for Jerry.
Jeremy.
-
Gerald Carter
e5f6676639 * fix segfault when no vfs objects defined
* add "sid=..." to 'net groupmap add'
-
Gerald Carter
f2fd0ab41f Merging smbgroupedit into 'net groupmap'. Not entirely done.
Need to check on where the privilege code is sitting
and update the docs.

Examples:

root# bin/net help groupmap
net groupmap add
  Create a new group mapping
net groupmap modify
  Update a group mapping
net groupmap delete
  Remove a group mapping
net groupmap list
  List current group map

# bin/net groupmap add
Usage: net groupmap add rid=<int> name=<string> type=<domain|local|builtin> [comment=<string>]

# bin/net groupmap delete
Usage: net groupmap delete name=<string|SID>

# bin/net groupmap modify
Usage: net groupmap modify name=<string|SID> [comment=<string>] [type=<domain|local>
-