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

59 Commits

Author SHA1 Message Date
Björn Jacke
ec49f28a52 s3/pam: move variable declaration into belonging ifdef section
This fixes a unused variable 'addr' warning on some platforms
2009-11-13 23:32:04 +01:00
todd stecher
9d4d2f70cb S3: Fixes for coverity issues. 2009-02-10 14:43:14 -08:00
todd stecher
989ad44d32 Memory leaks and other fixes found by Coverity 2009-01-21 17:13:03 -08:00
Günther Deschner
ab5076d9fd auth: Fix build warning.
Guenther
(This used to be commit 4661ef625a)
2008-08-25 11:36:56 +02:00
Volker Lendecke
0cdcd255a5 Fix two incompatible pointer warnings
Jeremy, please check
(This used to be commit 60500fac30)
2007-12-08 09:39:20 -08:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
5b0b4f23ef Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
(This used to be commit 963fc76852)
2007-11-03 23:20:10 -07:00
Jeremy Allison
25074433f4 I can't get away without a 'length' arg. :-).
Jeremy.
(This used to be commit 95d01279a5)
2007-11-03 18:41:26 -07:00
Jeremy Allison
6658165d5e Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
(This used to be commit e848506c85)
2007-11-03 18:15:45 -07: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
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -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
James Peach
f4ae285763 r23095: Support systems that have their PAM headers in /usr/include/pam.
(This used to be commit f1e8de4b57)
2007-10-10 12:22:45 -05:00
Gerald Carter
4646147a39 r18616: fix breakage after DLIST_ADD_END() changes for --with-pam
(This used to be commit 5c00b5497b)
2007-10-10 11:52:00 -05:00
Volker Lendecke
097bd537ad r17573: Fix typo
(This used to be commit fd6e3f133b)
2007-10-10 11:38:40 -05:00
Jeremy Allison
10b5609a14 r12279: unix_mask_match has been broken for *ever*... (How).
Ensure it returns a BOOL.
Jerry (and anyone else) please check this, I think
all uses are now correct but could do with another
set of eyes. Essential for 3.0.21 release.
Jeremy.
(This used to be commit 0c7b8a7637)
2007-10-10 11:05:51 -05:00
Volker Lendecke
e9c7079afe r8889: Another warning
(This used to be commit 9ae1098d21)
2007-10-10 11:00:19 -05:00
Volker Lendecke
2e0cac8e3e r6445: Make us survive the PARANOID_MALLOC_CHECKER. Should we enable that for
--enable-developer=yes?

Volker
(This used to be commit 61d40ac60d)
2007-10-10 10:56:41 -05:00
Jeremy Allison
54fdd5c7dc r4236: More *alloc fixes.
Jeremy.
(This used to be commit 6b25a6e088)
2007-10-10 10:53:39 -05:00
Jeremy Allison
521268be1c r2703: Fix typo noticed by Igor Belyi <sambauser@katehok.ac93.org>
Jeremy.
(This used to be commit ba69c7229c)
2007-10-10 10:52:49 -05:00
Jeremy Allison
94f59f5492 More tuning from cachegrind. Change most trim_string() calls to trim_char(0,
as that's what they do. Fix string_replace() to fast-path ascii.
Jeremy.
(This used to be commit f35e9a8b90)
2003-09-05 19:59:55 +00:00
Jeremy Allison
9bcbaeee32 Fixed strlower changes I missed. Pointed out by metze.
Jeremy
(This used to be commit da5ee2b765)
2003-07-04 18:50:21 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f947)
2003-01-03 08:28:12 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Andrew Bartlett
4f442bc011 Fix use of uninitialsed variable in PAM code
(This used to be commit 6c08c233e6)
2002-02-05 23:45:29 +00:00
Andrew Bartlett
ed389ee8dc Drastic impromvents to pam_winbind.
This adds code to do generic PAM -> NTSTATUS and NTSTATUS -> PAM error
conversions, and uses them to make the error handling in pam_winbind sane.

In particular, pam_winbind now uses PAM error codes, not silly '-1, -2 ...'
stuff, and logs the NTSTATUS error that winbind now sends over the pipe.

Added code to wbinfo to display these - makes a big difference in debugging
winbindd.

The main change here is the code to allow pam_winbind password changing to
correctly stack - This code ripped from pam_unix, and the copyright attached.
(Same as for all pam modules, including pam_winbind)

Andrew Bartlett
(This used to be commit dc1a72f896)
2002-02-05 09:40:36 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Andrew Bartlett
6ab678d42b Small 'const' updates ahead of some AuthRewrite merging.
(This used to be commit 3b5e72bda3)
2001-10-31 06:22:19 +00:00
Andrew Bartlett
d9d7f023d8 This commit is number 4 of 4.
In particular this commit focuses on:

Actually adding the 'const' to the passdb interface, and the flow-on changes.

Also kill off the 'disp_info' stuff, as its no longer used.

While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.

----

These changes introduces a large dose of 'const' to the Samba tree.
There are a number of good reasons to do this:

	- I want to allow the SAM_ACCOUNT structure to move from wasteful
	pstrings and fstrings to  allocated strings.  We can't do that if
	people are modifying these outputs, as they may well make
	assumptions about getting pstrings and fstrings

	- I want --with-pam_smbpass to compile with a slightly sane
	volume of warnings, currently its  pretty bad, even in 2.2
	where is compiles at all.

	- Tridge assures me that he no longer opposes 'const religion'
	based on the ability to  #define const the problem away.

	- Changed Get_Pwnam(x,y) into two variants (so that the const
	parameter can work correctly): - Get_Pwnam(const x) and
	Get_Pwnam_Modify(x).

	- Reworked smbd/chgpasswd.c to work with these mods, passing
	around a 'struct passwd' rather  than the modified username

---

This finishes this line of commits off, your tree should now compile again :-)

Andrew Bartlett
(This used to be commit c95f5aeb93)
2001-10-29 07:35:11 +00:00
Jeremy Allison
facbdd692d Fixed up the change password bug when not using PAM.
The problem is we were trying to use mask_match as a generic
wildcard matcher for UNIX strings (like the password prompts).
We can't do that - we need a unix_wild_match (re-added into lib/util.c)
as the ms_fnmatch semantics for empty strings are completely wrong.
This caused partial reads to be accepted as correct passwd change
responses when they were not....
Also added paranioa test to stop passwd change being done as root
with no %u in the passwd program string.
Jeremy.
(This used to be commit 9333bbeb76)
2001-10-02 21:58:09 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
4561e8a8ea move to SAFE_FREE()
(This used to be commit 64d35e94fe)
2001-09-17 05:04:17 +00:00
Andrew Tridgell
ed3fbafdd3 cope with pam being off
(This used to be commit 5f6e7bbce7)
2001-09-04 11:39:57 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Jeremy Allison
a9ab7eaa5d Fix case insensitive password change code.
Fixed crash bug with un-zeroed talloced memory.
Jeremy.
(This used to be commit eea1c30df2)
2001-07-23 22:06:05 +00:00
Jeremy Allison
429b3c3cc5 Password changing via PAM works now. DONT CHANGE THIS UNLESS YOU RE-TEST !!!!!!
Jeremy.
(This used to be commit 79574c07ed)
2001-07-06 22:54:49 +00:00
Jeremy Allison
b0be9cd768 Added Andrew's pam password change stuff. Needs some testing but looks good !
Jeremy.
(This used to be commit e94957d548)
2001-06-25 20:44:04 +00:00
Jeremy Allison
5db15a0d68 Fixed up the oldpw prompts. Made the matching case insensitive.
Jeremy.
(This used to be commit 70bdf8e761)
2001-05-09 21:14:41 +00:00
Jeremy Allison
aac630b382 Had to add a "pam password change" parameter (defaults to "off") and inlined
the pam password change code to ensure that existing and working password
chat scripts don't break with 2.2.1. PAM password changing has to be explicitly
requested.
Allowed wildcards in pam password change matching (matches password chat
script matching). Had to add const (sorry Tim :-) to ms_fnmatch() to
stop warnings. Don't worry - the const changes are isolated and don't
cause any other warnings :-).
Jeremy.
(This used to be commit 47b4d82536)
2001-05-02 23:32:09 +00:00
Jeremy Allison
0961f7b494 Runtime check for broken PAM systems with no appdata_ptr support. This
should eventually be an autoconf test with a #ifdef workaround. I *HATE* pam :-).
Jeremy.
(This used to be commit 52a9226a5a)
2001-05-01 18:25:20 +00:00
Jeremy Allison
e2a997f7a9 Stop coredump on pam password change with pam_pwdb.so module on error.
Jeremy.
(This used to be commit d9b960b4a5)
2001-05-01 18:19:15 +00:00
Jeremy Allison
5197ccfef4 Added Andrew Bartlett's fixes to my changes to his original patch (at the
court of king caractacus, was just passing by... :-).
Jeremy.
(This used to be commit acc3e7a057)
2001-05-01 17:19:42 +00:00
Jeremy Allison
a290cd597d Allow pam code to compile on Solaris (which doesn't have PAM_AUTHTOK_RECOVER_ERR).
Jeremy.
(This used to be commit 6b2dd14205)
2001-05-01 01:26:15 +00:00
Jeremy Allison
0901dd473a Fixing consts in pam code.
Jeremy.
(This used to be commit c4d3df4f14)
2001-04-30 23:14:44 +00:00
Jeremy Allison
c3a999409d Based on an original PAM patch by Andrew Bartlett, re-written by me to
remove global static PAM variables, and to tidy up the PAM internals code.
Now looks like the rest of Samba.
Still needs testing.
Jeremy.
(This used to be commit 1648ac64a7)
2001-04-30 21:05:58 +00:00
Jeremy Allison
70b55a9abc Added "obey pam restrictions" parameter - default to "off".
Only set this to "on" if you know you have your PAM set up correctly.....
NB. Doesn't apply to plaintext password authentication, which must use
pam when compiled in.
Jeremy.
(This used to be commit 59aa99f390)
2001-04-23 20:43:20 +00:00
Jeremy Allison
e00451106b Fix more free twice bugs.
Jeremy.
(This used to be commit 4db22afeed)
2001-04-23 06:22:02 +00:00
Jeremy Allison
d6a5dec6f2 Fix for bug in code for pam_session failure - pam_end called twice.
Jeremy.
(This used to be commit c4048fcdb6)
2001-04-23 06:09:27 +00:00
Jeremy Allison
ae8418d0c4 Added smb_ prefix to all Samba wrapper pam functions.
Fixed off by one bug using StrnCpy instead of strdup().
Jeremy.
(This used to be commit d4b1c0be2e)
2001-04-23 04:15:35 +00:00