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

138 Commits

Author SHA1 Message Date
Volker Lendecke
8a8f2583b8 Convert pdbedit to use pdb_search_users 2007-12-26 18:57:15 +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
Jeremy Allison
52dc5eaef2 Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
2007-12-10 11:30:37 -08:00
Jeremy Allison
0411635511 Getting to the home stretch for elimination of pstrings...
Jeremy.
2007-12-03 18:48:41 -08:00
Jeremy Allison
793a9d24a1 Fix the popt / bool issues. Some places we used BOOL
where we meant int. Fix this. Thanks to metze for
pointing this out.
Jeremy.
2007-10-19 11:38:36 -07: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
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Volker Lendecke
cddb9f11d5 r24943: Some stackframes 2007-10-10 12:30:29 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Simo Sorce
e077142aa3 r23407: While verifying a bug I found out that for some reason
the code to add a machine was different then the one used
to add a user, the old code led to the machine SID not being
built out correctly allocationg a new RID out of the passdb
but instead by using the old algorithmic method.
This may easily end up in creating duplicated SID when the
RID counter get close to the values built by the algorithmic method.

Simo.
2007-10-10 12:23:14 -05:00
Jeremy Allison
4e1a0b2549 r23005: If we're running on a system where time_t is 8 bytes
we have to take care to preserve the "special" values
for Windows of 0x80000000 and 0x7FFFFFFF when casting
between time_t and uint32. Add conversion functions
(and use them).
Jeremy.
2007-10-10 12:22:13 -05:00
James Peach
b8959b1720 r22828: Fix typo. Bugzilla #4589. 2007-10-10 12:22:00 -05:00
Volker Lendecke
f540c18b2b r21962: Make pdbedit use the configfile specified by -s 2007-10-10 12:18:53 -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
Jeremy Allison
02d08ca0be r21755: Memory leak fixes from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
2007-10-10 12:18:28 -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
70038e8f7b r19127: Fix bug 4152 2007-10-10 12:15:14 -05:00
Jim McDonough
c53d4a8151 r18748: Eliminate set of computed time values 2007-10-10 12:00:54 -05:00
Volker Lendecke
fa8b2e2a58 r18313: Nobody said "no" (yet.... gd?), so commit it:
Remove the account_policy_migrated() thingy, and make cache_account_policy_set
use gencache. Account policies are now handled like groups and users are with
respect to "passdb backend".

Volker
2007-10-10 11:51:19 -05:00
Volker Lendecke
678bbcf061 r16252: Fix Klocwork ID 1119, 1121.
Volker
2007-10-10 11:17:28 -05:00
Gerald Carter
df53d64910 r14577: BUG Fixes:
* Add back in the import/export support to pdbedit
* Fix segv in pam_smbpass
* Cleanup some error paths in pdb_tdb and pdb_interface
2007-10-10 11:15:37 -05:00
Günther Deschner
0167b6cca8 r14062: Forgot those in the uint16/32 acb_info switch.
Guenther
2007-10-10 11:11:09 -05:00
Gerald Carter
bcf269e2ec r13679: Commiting the rm_primary_group.patch posted on samba-technical
* ignore the primary group SID attribute from struct samu*
* generate the primary group SID strictlky from the Unix
  primary group when dealing with passdb users
* Fix memory leak in original patch caused by failing to free a
  talloc *
* add wrapper around samu_set_unix() to prevent exposing the create
  BOOL to callers.  Wrappers are samu_set_unix() and samu-allic_rid_unix()
2007-10-10 11:10:23 -05:00
Jeremy Allison
02da5189f1 r13607: Fix compile - don't ref auto variable in a structure initialization.
Fix from Richard Bollinger <rabollinger@gmail.com>.
Jeremy.
2007-10-10 11:10:19 -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
b65be8874a r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
2007-10-10 11:10:14 -05:00
Lars Müller
4272419b11 r13525: This is only a cleanup to have the memset() and SAFE_FREE() only one
time in the code.

Even if we now have an additional if statement after the free I prefer
this solution in opposite to the duplicated code we had before.
2007-10-10 11:10:10 -05:00
Lars Müller
dbdc5ba497 r13524: Add -t|--password-from-stdin option to pdbedit as we had with Samba 2.2.
This fixes bug #1386.

The initial changes had been made by Carsten Höger <choeger at
open-xhange dot com> for Samba 2.2 while being at SuSE. *sigh*

To not duplicate code from smbpasswd in pdbedit stdin_new_passwd() and
get_pass() are moved from smbpasswd to utils/passwd_util.c.
2007-10-10 11:10:10 -05:00
Volker Lendecke
d0efb435e5 r13517: Fix typo -- thanks to Karolin Seeger <ks@sernet.de> 2007-10-10 11:10:09 -05:00
Gerald Carter
7a2da5f0cc r13460: by popular demand....
* remove pdb_context data structure
* set default group for DOMAIN_RID_GUEST user as RID 513 (just
  like Windows)
* Allow RID 513 to resolve to always resolve to a name
* Remove auto mapping of guest account primary group given the
  previous 2 changes
2007-10-10 11:10:04 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Derrell Lipman
f2a24de769 r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
2007-10-10 11:06:18 -05:00
Simo Sorce
65d5abda68 r13136: Fix handling user sid and user gid 2007-10-10 11:06:15 -05:00
Jeremy Allison
c970d7d0a5 r12555: Fix more load_case_table swegfaults. Arggg.
What I'd give for a global constructor...
Jeremy.
2007-10-10 11:05:59 -05:00
Gerald Carter
be32f10609 r12398: adding Guenther's account policy migration fix 2007-10-10 11:05:54 -05:00
Volker Lendecke
37267d5ab0 r11327: Make user domain settable by pdbedit 2007-10-10 11:05:12 -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
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Tim Potter
7d8dd97c3d r9272: Patch for fixing unused variables warning from Jason Mader. Fixes
bugzilla #2984.
2007-10-10 11:00:30 -05:00
Jeremy Allison
9506b8e145 r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
2007-10-10 10:58:00 -05:00
Tim Potter
ede9fd08cf r5909: Remove some unecessary casts. Patch from Jason Mader for bugzill #2468. 2007-10-10 10:56:08 -05:00
Volker Lendecke
dc442ea7a0 r5862: And some more const 2007-10-10 10:56:06 -05:00
John Terpstra
df6f0815af r5790: Added ability to set account description. 2007-10-10 10:56:01 -05:00
Günther Deschner
fdf9bdbbac r5349: After talking with Jerry, reverted the addition of account policies to
passdb in 3_0 (they are still in trunk).

Guenther
2007-10-10 10:55:38 -05:00
Günther Deschner
75af83dfcd r4925: Migrate Account Policies to passdb (esp. replicating ldapsam).
Does automated migration from account_policy.tdb v1 and v2 and offers a
pdbedit-Migration interface. Jerry, please feel free to revert that if
you have other plans.

Guenther
2007-10-10 10:55:08 -05:00
Jeremy Allison
033105376e r4921: Typo. 2007-10-10 10:55:07 -05:00
Jeremy Allison
3d09c15d8f r4917: Merge some of Derrell.Lipman@UnwiredUniverse.com obvious fixes.
Added text explaining units in pdbedit time fields.
Jeremy.
2007-10-10 10:55:07 -05:00
Günther Deschner
6394257cc7 r4847: Hand over a acb_mask to pdb_setsampwent in load_sampwd_entries().
This allows the ldap-backend to search much more effeciently. Machines
will be searched in the ldap_machine_suffix and users in the
ldap_users_suffix. (Note that we already use the ldap_group_suffix in
ldapsam_setsamgrent for quite some time).

Using the specific ldap-bases becomes notably important in large
domains: On my testmachine "net rpc trustdom list" has to search through
40k accounts just to list 3 interdomain-trust-accounts, similiar effects
show up the non-user query_dispinfo-calls, etc.

Also renamed all_machines to only_machines in load_sampwd_entries()
since that reflects better what is really meant.

Guenther
2007-10-10 10:53:59 -05:00