1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

191 Commits

Author SHA1 Message Date
Jeremy Allison
087489b7f2 Developer doesn't cut it - need #define test for NSS_WRAPPER.
Hopefully this should fix the buildfarm.
Jeremy.
2007-12-12 18:38:52 -08:00
Jeremy Allison
a50c2d159c Only add the non-root escape on !developer.
Jeremy.
2007-12-12 18:07:02 -08:00
Jeremy Allison
1bb5ce824f Fix the buildfarm until I figure out how to allow
smbpasswd -L for non-root on the buildfarm only.
Jeremy.
2007-12-12 17:56:28 -08:00
Jeremy Allison
0723760ba4 Fix bug #3727 with patch from Steve Langasek <vorlon@debian.org>
Jeremy.
2007-12-12 17:26:49 -08: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
Volker Lendecke
49949f0b85 Make remote_password_change return malloced error strings
This fixes a segfault in smbpasswd -r
2007-11-23 13:04:50 -08:00
Jeremy Allison
f652fe2bdb Remove pstrings from pam_smbpass - make local_password_change
return malloced strings.
Jeremy.
2007-11-21 17:42:52 -08: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
cddb9f11d5 r24943: Some stackframes 2007-10-10 12:30:29 -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 Bartlett
721375e14c r22071: Make the error message for incorrect use of '-c' show the parameter as used.
This means that smbpasswd -c user (which in htpasswd creates a new file)
and smbpasswd -c /not/my/smb.conf should give errors an admin will
think to chase down.

Andrew Bartlett
2007-10-10 12:19:09 -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
Volker Lendecke
b82c95cb43 r16247: Fix Coverity ID 296 2007-10-10 11:17:27 -05:00
Jeremy Allison
a0d368197d r16241: Fix Klocwork #106 and others like it.
Make 2 important changes. pdb_get_methods()
returning NULL is a *fatal* error. Don't try
and cope with it just call smb_panic. This
removes a *lot* of pointless "if (!pdb)" handling
code. Secondly, ensure that if samu_init()
fails we *always* back out of a function. That
way we are never in a situation where the pdb_XXX()
functions need to start with a "if (sampass)"
test - this was just bad design, not defensive
programming.
Jeremy.
2007-10-10 11:17:27 -05:00
Gerald Carter
0a81af4fef r15906: smbpasswd help text for -W option (patch from Aruna Prabakar <aruna.prabakar@hp.com> 2007-10-10 11:17:12 -05:00
Gerald Carter
3522b53aec r15311: look at the NT password (not lanman one) when determining if smbpasswd -e should probably for a password 2007-10-10 11:16:35 -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
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
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
c2c004a620 r13148: Fix bug: #3413
Check that ldap admin dn is defined in smb.conf before
setting the ldap password in secrets.tdb

Based on patch by William Jojo <jojowil@hvcc.edu>

Simo.
2007-10-10 11:06:15 -05:00
Volker Lendecke
2942f3594b r12840: Add -W to smbpasswd. Thanks to William Jojo <jojowil@hvcc.edu>.
Volker
2007-10-10 11:06:04 -05:00
Volker Lendecke
9ca8edc26e r12544: Fix segfaults in winbind, smbpasswd and net 2007-10-10 11:05:59 -05:00
Jeremy Allison
6c9f227ef4 r6261: Tidyup message str printf. Ensure tvs struct is zeroed.
Jeremy.
2007-10-10 10:56:33 -05:00
Jeremy Allison
3dfa6c40fc r6256: Fix fprintf errors in smbpasswd. Fix for bug #2585 Ulf Härnhammar <metaur@telia.com>
Jeremy.
2007-10-10 10:56:32 -05:00
Volker Lendecke
5c9fd4d896 r3882: Fix bug 2069 -- thanks to jason@ncac.gwu.edu 2007-10-10 10:53:23 -05:00
Jeremy Allison
a3589a18b6 r1504: Remove insane use of "user password" on the COMMAND LINE !
in smbpasswd. Use -s if you want to script this.
Jeremy.
2007-10-10 10:52:13 -05:00
Andrew Bartlett
86ad04d26d I *hate* global variables...
OK, what was happening here was that we would invalidate global_sam_sid
when we set the sid into secrets.tdb, to force a re-read.

The problem was, we would do *two* writes into the TDB, and the second one
(in the PDC/BDC case) would be of a NULL pointer.  This caused smbd startups
to fail, on a blank TDB.

By using a local variable in the pdb_generate_sam_sid() code, we avoid this
particular trap.

I've also added better debugging for the case where this all matters, which
is particularly for LDAP, where it finds out a domain SID from the sambaDomain
object.

Andrew Bartlett
-
Jeremy Allison
f9c7a42e89 Fix "unable to initialize" bug when smbd hasn't been run with
new system and a user is being added via pdbedit/smbpasswd.
Found at Connectathon setup.
Jeremy.
-
Andrew Bartlett
955436a6f6 This should be the correct fix for the lack of a prototype for
remote_password_change().

Sorry for the original bug.

Andrew Bartlett
-
Gerald Carter
5a32f9568f fix problems with proto.h -
Gerald Carter
b60f6ec30d remerge andrew's cracklib patch from HEAD and fix a compile warnings -
Simo Sorce
fa7dea1710 fix online help
-w option need the password on the command line
-
Tim Potter
8b818ce381 Replace the eight (!) copies of dummy become/unbecome root with a single one. -
Volker Lendecke
46ec022f87 Jim, could you please look at this? smbpasswd -a <username> was broken
for me without this patch. I'm not sure if I interpreted your patch to
this code right.

Thanks,

Volker
-
Jim McDonough
6ebe87d318 Doesn't re-prompt for password when it is specified on the cmdline -
Gerald Carter
f005f1cf12 more compile fixes for become/unbecome_root() -
Jeremy Allison
ff222716a0 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
-
Jelmer Vernooij
d817eaf0ec Reverse previous patch from Stefan and me after comments by Andrew Bartlett -
Jelmer Vernooij
74d9ecfe2d Patch from metze and me that adds dummy smb_register_*() functions so
that is now possible to, for example, load a module which contains
an auth method into a binary without the auth/ subsystem built in.
-
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
Gerald Carter
b17af40b1c merge of smbpasswd segfault from SAMBA_2_2 -
Jeremy Allison
f755711df8 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
-
Andrew Bartlett
4e74d00b36 Merge from HEAD:
- change auth_sam to use the initialisation flags to determine if
	 the password attributes are set

 - add const to secrets.c, cliconnect.c

 - passdb:  fix spelling in pdb_ldap, add group mapping back to smbpasswd

 - SAMR: add debugs to show what fails for group enum.

Andrew Bartlett
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Jelmer Vernooij
1b83b78e33 sync 3.0 branch with HEAD -