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

101 Commits

Author SHA1 Message Date
Jeremy Allison
b4c9cfb2af Fix a bunch of compiler warnings about wrong format types.
Should make Solaris 10 builds look cleaner.
Jeremy.
2009-05-11 21:56:57 -07:00
Volker Lendecke
46bcb10b5a Shape up pdb_search a bit by making it a talloc ctx with a destructor 2009-03-07 17:51:21 +01: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
Michael Adam
92c983292e net sam: fix typo in comment
Michael
(This used to be commit b9f6904044)
2008-06-17 23:57:26 +02:00
Michael Adam
00168e4d5a net sam: fix typo in debug message.
Michael
(This used to be commit 6d7f64c348)
2008-06-17 23:56:42 +02:00
Kai Blin
255bdb2602 net: Rename functable3 to functable, get rid of old functables
(This used to be commit bb7c5fc4ec)
2008-06-10 09:48:21 +02:00
Kai Blin
cd06703a3f net: Make "net sam" use functable3
(This used to be commit b161fb7cfe)
2008-06-10 09:48:14 +02:00
Kai Blin
16938883e6 net: Use true/false instead of True/False.
(This used to be commit a8b567aac3)
2008-05-20 14:27:08 +02:00
Kai Blin
4206d97544 net: more whitespace cleanup
(This used to be commit ef0184d580)
2008-05-10 09:22:31 +02:00
Kai Blin
f576910944 net: Remove globals
(This used to be commit 1e9319cf88)
2008-05-10 09:22:27 +02:00
Karolin Seeger
5f68ea53ff objectclass -> objectClass
Karolin
(This used to be commit b865b8a79a)
2008-04-10 10:45:36 +02:00
Volker Lendecke
5f196fafd3 Properly destroy the pdb search object
(This used to be commit 514cf53224)
2007-12-26 18:57:14 +01:00
Michael Adam
602bb7d766 Make usage message for net sam rights list a little more precise.
Michael
(This used to be commit d466a5136d)
2007-12-17 13:23:05 +01:00
Michael Adam
7d5415a2cc Fix flags in all callers of lookup_name() in net_sam.c.
Michael
(This used to be commit 6d0db17a9e)
2007-12-17 13:06:01 +01:00
Volker Lendecke
7b01537679 Replace sid_string_static with sid_string_tos
In utils/ I was a bit lazy...
(This used to be commit 60e830b0f4)
2007-12-15 22:09:36 +01:00
Volker Lendecke
54ae9dfcbc Use sid_string_talloc where we have a tmp talloc ctx
(This used to be commit 0a911d38b8)
2007-12-15 22:09:36 +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
Volker Lendecke
54d3c7f61d 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
(This used to be commit 0c5657b5ef)
2007-10-10 12:30:36 -05:00
Jeremy Allison
fc213876d5 r25019: Fix coverity bug #105, run #332. Use of uninitialized variable.
Jeremy.
(This used to be commit a58de8cee5)
2007-10-10 12:30:34 -05:00
Volker Lendecke
929e1d9920 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
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -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
Andrew Tridgell
248a82c0f2 r23323: merged ldb changes from 3.0.26
(This used to be commit 7c9a5c2a3f)
2007-10-10 12:23:06 -05:00
Volker Lendecke
1cb8a948b3 r22787: More from Karolin: Make map_unix_group() static to net_sam.c, add "net
sam unmapunixgroup"
(This used to be commit 55e2f35fad)
2007-10-10 12:21:57 -05:00
Volker Lendecke
9e30a76c04 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 :-)
(This used to be commit 590d2164b3)
2007-10-10 12:21:57 -05:00
Volker Lendecke
a0f9db7a16 r22767: Argl. Typed in 'svn ci' in the wrong branch. Revert.
(This used to be commit 2c5b951eba)
2007-10-10 12:21:55 -05:00
Volker Lendecke
16ae8eff93 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>.
(This used to be commit fb6ac8a5b2)
2007-10-10 12:21:55 -05:00
Michael Adam
956a5ce7d5 r22412: Add a "deletelocalgroup" subcommand to net sam.
Thanks to Karolin Seeger <ks@sernet.de>.
(This used to be commit 1499c50513)
2007-10-10 12:19:32 -05:00
Volker Lendecke
0d91334fe7 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
(This used to be commit af3308ce5a)
2007-10-10 12:18:33 -05:00
Simo Sorce
10820162f1 r21776: fix bugs #4438 #4440
(This used to be commit 319fcb4ea8)
2007-10-10 12:18:31 -05:00
Volker Lendecke
b5e262dbd0 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
(This used to be commit b6347751d8)
2007-10-10 12:17:01 -05:00
Volker Lendecke
e2bebe4865 r19978: More "net sam policy" improvements. Thanks to Karolin Seeger <ks@sernet.de>
Volker
(This used to be commit fde042f29e)
2007-10-10 12:16:17 -05:00
Volker Lendecke
ca70f53930 r19840: Fix an uninitialized variable
(This used to be commit c4b5e8c7a0)
2007-10-10 12:16:01 -05:00
Volker Lendecke
b724a28019 r19835: Some net sam policy improvements.
Thanks to Karolin Seeger <ks@sernet.de>

Volker
(This used to be commit 2091018a53)
2007-10-10 12:16:01 -05:00
Jim McDonough
0f961cb6db r18758: Update net sam to use calculated times and force change password properly.
(This used to be commit fb269ca0af)
2007-10-10 12:00:55 -05:00
Volker Lendecke
e5b3b3cac5 r18556: Implement "net sam policy", thanks to Karolin Seeger <ks@sernet.de>.
Volker
(This used to be commit da22aa7021)
2007-10-10 11:51:49 -05:00
Gerald Carter
2b27c93a9a 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.
(This used to be commit 3da9f80c28)
2007-10-10 11:51:18 -05:00
Volker Lendecke
03e3cd1d5a r17554: Cleanup
(This used to be commit 761cbd52f0)
2007-10-10 11:38:38 -05:00
Volker Lendecke
e1e62d8999 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
(This used to be commit f9856f6490)
2007-10-10 11:38:36 -05:00
Volker Lendecke
ff7c0a7c35 r17451: Change pdb_getgrsid not to take a DOM_SID but a const DOM_SID * as an
argument.

Volker
(This used to be commit 873a5a1211)
2007-10-10 11:38:34 -05:00
Volker Lendecke
e7fc37cf0f 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
(This used to be commit 3df0bf7d60)
2007-10-10 11:18:48 -05:00
Jeremy Allison
300acb99ad r16284: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != unsigned
int
in a format string.
Jeremy.
(This used to be commit face01ef01)
2007-10-10 11:17:31 -05:00
Volker Lendecke
22c4ad8a10 r15173: Fix a non-critical memleak
(This used to be commit bb8c69162f)
2007-10-10 11:16:27 -05:00
Jeremy Allison
22dbd67708 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.
(This used to be commit 08e52ead03)
2007-10-10 11:15:57 -05:00
Gerald Carter
efd32bf371 r14699: allow 'net sam addmem' to accept a SID for the member
(This used to be commit 08d201806f)
2007-10-10 11:15:44 -05:00
Gerald Carter
b36e2921ee r14580: add 'net sam createbuiltingroup' to map BUILTIN local groups to a gid
(This used to be commit 3137fe5068)
2007-10-10 11:15:38 -05:00
Simo Sorce
092e3ed45a r13846: Take care of system that do not have LDAP libraries
(This used to be commit ab62c8d93a)
2007-10-10 11:10:57 -05:00
Simo Sorce
d54010e219 r13843: Merge in net sam provision and some pdb_ldap fixes
(This used to be commit 705d811808)
2007-10-10 11:10:56 -05:00
Gerald Carter
cd55919263 r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()
* replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix()
(This used to be commit 6f1afa4acc)
2007-10-10 11:10:16 -05:00
Gerald Carter
2203bed32c 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......
(This used to be commit 19b7593972)
2007-10-10 11:10:15 -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