Stefan Metzmacher
108724ac34
s3:auth: let smb_pam_conv() handle resp=NULL
...
pam_matrix calls smb_pam_conv() with resp=NULL in some situation,
we should not segfault...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9705
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2024-07-17 10:12:36 +00:00
Andreas Schneider
ec7dfedccf
s3:auth: Avoid passing freed pamh pointer to funcitons using it
...
"Error: USE_AFTER_FREE (CWE-416):
samba-4.20.0rc2/source3/auth/pampass.c:466: freed_arg: ""pam_end"" frees ""pamh"".
samba-4.20.0rc2/source3/auth/pampass.c:467: pass_freed_arg: Passing freed pointer ""pamh"" as an argument to ""smb_pam_error_handler"".
465| if( pamh != NULL ) {
466| pam_error = pam_end(pamh, 0);
467|-> if(smb_pam_error_handler(pamh, pam_error, ""End Cleanup Failed"", 2) == True) {
468| DEBUG(4, (""smb_pam_end: PAM: PAM_END OK.\n""));
469| return True;"
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2024-06-28 11:39:33 +00:00
Andreas Schneider
990a68fedb
s3:auth: Remove trailing spaces in pampass.c
...
Reviewed-by: Noel Power <npower@samba.org>
2024-06-28 11:39:33 +00:00
Joseph Sutton
9e2a93d54b
s3:auth: Fix code spelling
...
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-11 02:42:41 +00:00
Joseph Sutton
29b2dcb4f5
s3:auth: Add missing newlines to logging messages
...
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-08 04:39:37 +00:00
Andreas Schneider
e57f034f01
s3:auth: Fix code spelling
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2023-07-05 06:34:32 +00:00
Volker Lendecke
3f7c646774
lib: Remove fstring_sub() that was used just once
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-12-12 21:16:33 +00:00
Matthew DeVore
c2ac923c6a
s3: safe_string: do not include string_wrappers.h
...
Rather than have safe_string.h #include string_wrappers.h, make users of
string_wrappers.h include it explicitly.
includes.h now no longer includes string_wrappers.h transitively. Still
allow includes.h to #include safe_string.h for now so that as many
modules as possible get the safety checks in it.
Signed-off-by: Matthew DeVore <matvore@google.com>
Reviewed-by: David Mulder <dmulder@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-28 00:56:34 +00:00
Ralph Boehme
4551dd2784
smbdotconf: mark "passwd chat" with substitution="1"
...
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:35 +00:00
Andreas Schneider
be04480e08
s3:auth: Use #ifdef instead of #if for config.h definitions
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-11-28 23:19:22 +01:00
Andreas Schneider
03ed979eb0
s3:auth: Add FALL_THROUGH statements in pampass.c
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-03-01 04:37:42 +01:00
Michael Adam
476672b647
dlist: remove unneeded type argument from DLIST_ADD_END()
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-06 21:48:17 +01:00
Maks Naumov
9343386b91
s3: Fix pam_authenticate() when lp_null_passwords() is true
...
(PAM_SILENT | lp_null_passwords() ? 0 : PAM_DISALLOW_NULL_AUTHTOK)
is always 0 when lp_null_passwords() == true.
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-05-04 18:24:21 +02:00
Gregor Beck
c9a2111b00
s3:auth: use const in smb_pam_xxx_session()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19 12:14:58 +02:00
Jeremy Allison
b70f23c2b5
Correctly check for errors in strlower_m() returns.
2012-08-09 12:08:18 -07:00
Rusty Russell
fe72740e82
loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
...
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().
A simple patch, but hits a lot of files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Günther Deschner
7e73214ebf
s3-auth: use auth.h where needed.
...
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
34722c72f6
pam: share pam errors in a common location.
...
Guenther
2011-02-08 14:05:36 +01:00
Volker Lendecke
636d107989
s3: Fix smb_pam_passcheck
2010-08-28 11:05:22 +02:00
Volker Lendecke
67522702ac
s3: Those functions are no macros anymore :-)
2010-08-28 10:54:39 +02:00
Volker Lendecke
9322fa4077
s3: Lift smbd_server_fd() from smb_pam_passcheck
2010-08-27 21:59:09 +02:00
Volker Lendecke
26ee30585d
s3: Lift smbd_server_fd() from smb_pam_start
...
smb_pam_passcheck() is the only caller that fills in NULL, all other callers
now properly fill rhost
2010-08-27 21:59:09 +02:00
Volker Lendecke
8e1d3b5f8f
s3: Pass rhost through to smb_pam_passchange
2010-08-27 12:53:17 +02:00
Volker Lendecke
33f9c078d3
s3: Fix typos
2010-08-26 22:57:13 +02:00
Björn Jacke
aa830cde6a
pam: fix unused variable warning
2010-08-24 11:18:34 +02:00
Volker Lendecke
a16a56f601
s3: PAM_RHOST and PAM_TTY are enums on FreeBSD
2010-08-23 22:59:56 +02:00
Volker Lendecke
8531921e3d
s3: Turn two macros into functions
2010-08-22 22:42:21 +02:00
Volker Lendecke
177e394f93
s3: Pass the rhost through smb_pam_accountcheck
2010-08-22 22:42:21 +02:00
Volker Lendecke
6ff012a777
s3: Fix some nonemtpy blank lines
2010-08-22 22:42:21 +02:00
Volker Lendecke
96ae457023
s3: Remove get_client_fd()
2010-08-16 13:13:10 +02:00
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