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

60 Commits

Author SHA1 Message Date
Kai Blin
f7d0903a58 net: The top level help function for net cmd is always net_cmd_usage 2008-05-20 14:28:12 +02:00
Kai Blin
a8b567aac3 net: Use true/false instead of True/False. 2008-05-20 14:27:08 +02:00
Kai Blin
ef0184d580 net: more whitespace cleanup 2008-05-10 09:22:31 +02:00
Kai Blin
1e9319cf88 net: Remove globals 2008-05-10 09:22:27 +02:00
Volker Lendecke
eb523ba776 s/sid_to_string/sid_to_fstring/
least surprise for callers
2007-12-15 22:47:30 +01:00
Volker Lendecke
60e830b0f4 Replace sid_string_static with sid_string_tos
In utils/ I was a bit lazy...
2007-12-15 22:09:36 +01:00
Günther Deschner
6bf2c8038c Move param helper routines to one place.
Guenther
2007-11-30 22:25:01 +01:00
Jeremy Allison
f35a266b3c 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.
2007-10-18 17:40:25 -07:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Andrew Tridgell
7c9a5c2a3f r23323: merged ldb changes from 3.0.26 2007-10-10 12:23:06 -05:00
Gerald Carter
3da9f80c28 r18271: Big change:
* autogenerate lsa ndr code
* rename 'enum SID_NAME_USE' to 'enum lsa_SidType'
* merge a log more security descriptor functions from
  gen_ndr/ndr_security.c in SAMBA_4_0

The most embarassing thing is the "#define strlen_m strlen"
We need a real implementation in SAMBA_3_0 which I'll work on
after this code is in.
2007-10-10 11:51:18 -05:00
Gerald Carter
dde552336c r17669: Remove RID algorithm support from unmapped users and groups
when using smbpasswd
2007-10-10 11:38:45 -05:00
Volker Lendecke
761cbd52f0 r17554: Cleanup 2007-10-10 11:38:38 -05:00
Jeremy Allison
2ba0d93d53 r17496: net groupmap add could add uninitialized sid_name_type
entries to the group mapping db. Ensure this can't happen.
Jeremy.
2007-10-10 11:38:37 -05:00
Volker Lendecke
4ebfc30a28 r17468: To minimize the diff later on, pre-commit some changes independently: Change
internal mapping.c functions to return NTSTATUS instead of BOOL.

Volker
2007-10-10 11:38:36 -05:00
Volker Lendecke
244b25ae49 r17465: Get rid of add_initial_entry. In the two places it was called in it seemed a
bit pointless to me.

Volker
2007-10-10 11:38:36 -05:00
Volker Lendecke
f9856f6490 r17463: A bit of cleanup work:
Remove some unused code: pdb_find_alias is not used anymore, and nobody I
think has ever used the pdb_nop operations for group mapping. smbpasswd and
tdb use the default ones and ldap has its own.

Make the functions pdb_getgr* return NTSTATUS instead of BOOL. Nobody right
now really makes use of it, but it feels wrong to throw away information so
early.

Volker
2007-10-10 11:38:36 -05:00
Volker Lendecke
873a5a1211 r17451: Change pdb_getgrsid not to take a DOM_SID but a const DOM_SID * as an
argument.

Volker
2007-10-10 11:38:34 -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
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.
-