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

44 Commits

Author SHA1 Message Date
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
Karolin Seeger
b865b8a79a objectclass -> objectClass
Karolin
2008-04-10 10:45:36 +02:00
Volker Lendecke
514cf53224 Properly destroy the pdb search object 2007-12-26 18:57:14 +01:00
Michael Adam
d466a5136d Make usage message for net sam rights list a little more precise.
Michael
2007-12-17 13:23:05 +01:00
Michael Adam
6d0db17a9e Fix flags in all callers of lookup_name() in net_sam.c.
Michael
2007-12-17 13:06:01 +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
Volker Lendecke
0a911d38b8 Use sid_string_talloc where we have a tmp talloc ctx 2007-12-15 22:09:36 +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
Volker Lendecke
0c5657b5ef r25040: Add "net sam rights"
Not strictly in the SAM, but close enough. This command acts directly on
the local tdb, no running smbd required

This also changes the root-only check to a warning
2007-10-10 12:30:36 -05:00
Jeremy Allison
a58de8cee5 r25019: Fix coverity bug #105, run #332. Use of uninitialized variable.
Jeremy.
2007-10-10 12:30:34 -05:00
Volker Lendecke
6585ea2cb7 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
2007-10-10 12:30:24 -05: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
Volker Lendecke
55e2f35fad r22787: More from Karolin: Make map_unix_group() static to net_sam.c, add "net
sam unmapunixgroup"
2007-10-10 12:21:57 -05:00
Volker Lendecke
590d2164b3 r22786: Some cleanup by Karolin Seeger: Remove unused pdb_find_alias, and change
return values of some alias-releated pdb functions from BOOL to NTSTATUS

Thanks :-)
2007-10-10 12:21:57 -05:00
Volker Lendecke
2c5b951eba r22767: Argl. Typed in 'svn ci' in the wrong branch. Revert. 2007-10-10 12:21:55 -05:00
Volker Lendecke
fb6ac8a5b2 r22766: Merge from 3_0:
r22412 | obnox | 2007-04-20 14:23:36 +0200 (Fr, 20 Apr 2007) | 5 lines

Add a "deletelocalgroup" subcommand to net sam.

Thanks to Karolin Seeger <ks@sernet.de>.
2007-10-10 12:21:55 -05:00
Michael Adam
1499c50513 r22412: Add a "deletelocalgroup" subcommand to net sam.
Thanks to Karolin Seeger <ks@sernet.de>.
2007-10-10 12:19:32 -05:00
Volker Lendecke
af3308ce5a r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes winbind
who did not run the idle events to drop ldap connections.

Volker
2007-10-10 12:18:33 -05:00
Simo Sorce
319fcb4ea8 r21776: fix bugs #4438 #4440 2007-10-10 12:18:31 -05:00
Volker Lendecke
b6347751d8 r20654: Fix from Karolin Seeger <ks@sernet.de>: Accept "forever", "off" and "never" as
key words for -1 as policy values for net sam policy.

Volker
2007-10-10 12:17:01 -05:00
Volker Lendecke
fde042f29e r19978: More "net sam policy" improvements. Thanks to Karolin Seeger <ks@sernet.de>
Volker
2007-10-10 12:16:17 -05:00
Volker Lendecke
c4b5e8c7a0 r19840: Fix an uninitialized variable 2007-10-10 12:16:01 -05:00
Volker Lendecke
2091018a53 r19835: Some net sam policy improvements.
Thanks to Karolin Seeger <ks@sernet.de>

Volker
2007-10-10 12:16:01 -05:00
Jim McDonough
fb269ca0af r18758: Update net sam to use calculated times and force change password properly. 2007-10-10 12:00:55 -05:00
Volker Lendecke
da22aa7021 r18556: Implement "net sam policy", thanks to Karolin Seeger <ks@sernet.de>.
Volker
2007-10-10 11:51:49 -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
Volker Lendecke
761cbd52f0 r17554: Cleanup 2007-10-10 11:38:38 -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
Volker Lendecke
3df0bf7d60 r16360: Fix Klocwork ID 136 520 521 522 523 542 574 575 576 607
in net_rpc.c: 715 716 732 734 735 736 737 738 739 749

in net_rpc_audit.c: 754 755 756

in net_rpc_join.c: 757

in net_rpc_registry: 766 767

in net_rpc_samsync.c: 771 773

in net_sam.c: 797 798

Volker
2007-10-10 11:18:48 -05:00
Jeremy Allison
face01ef01 r16284: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != unsigned
int
in a format string.
Jeremy.
2007-10-10 11:17:31 -05:00
Volker Lendecke
bb8c69162f r15173: Fix a non-critical memleak 2007-10-10 11:16:27 -05:00
Jeremy Allison
08e52ead03 r15018: Merge Volker's ipc/trans2/nttrans changes over
into 3.0. Also merge the new POSIX lock code - this
is not enabled unless -DDEVELOPER is defined.
This doesn't yet map onto underlying system POSIX
locks. Updates vfs to allow lock queries.
Jeremy.
2007-10-10 11:15:57 -05:00
Gerald Carter
08d201806f r14699: allow 'net sam addmem' to accept a SID for the member 2007-10-10 11:15:44 -05:00
Gerald Carter
3137fe5068 r14580: add 'net sam createbuiltingroup' to map BUILTIN local groups to a gid 2007-10-10 11:15:38 -05:00
Simo Sorce
ab62c8d93a r13846: Take care of system that do not have LDAP libraries 2007-10-10 11:10:57 -05:00
Simo Sorce
705d811808 r13843: Merge in net sam provision and some pdb_ldap fixes 2007-10-10 11:10:56 -05:00
Gerald Carter
6f1afa4acc r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()
* replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix()
2007-10-10 11:10:16 -05:00
Gerald Carter
19b7593972 r13576: This is the beginnings of moving the SAM_ACCOUNT data structure
to make full use of the new talloc() interface.  Discussed with Volker
and Jeremy.

* remove the internal mem_ctx and simply use the talloc()
  structure as the context.
* replace the internal free_fn() with a talloc_destructor() function
* remove the unnecessary private nested structure
* rename SAM_ACCOUNT to 'struct samu' to indicate the current an
  upcoming changes.  Groups will most likely be replaced with a
  'struct samg' in the future.

Note that there are now passbd API changes.  And for the most
part, the wrapper functions remain the same.

While this code has been tested on tdb and ldap based Samba PDC's
as well as Samba member servers, there are probably still
some bugs.  The code also needs more testing under valgrind to
ensure it's not leaking memory.

But it's a start......
2007-10-10 11:10:15 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00