PAM

~roguescholar/pam/+git/upstream:ldv/_pam_mkargv

Last commit made on 2023-11-14
Get this branch:
git clone -b ldv/_pam_mkargv https://git.launchpad.net/~roguescholar/pam/+git/upstream

Branch merges

Branch information

Name:
ldv/_pam_mkargv
Repository:
lp:~roguescholar/pam/+git/upstream

Recent commits

6a4bf99... by "Dmitry V. Levin" <email address hidden>

libpam: fix _pam_mkargv return value on error path

* libpam/pam_misc.c (_pam_mkargv): Return 0 in case of memory allocation
failure.

d89e94b... by Flaviu Tamas <email address hidden>

pam_shells: improve error message on denial

d686b51... by Benny Baumann <email address hidden>

libpam: avoid infinite recursion with includes

When there's a loop of configuration files consisting solely of includes
the recursion depth level is never incremented and thus no upper limit is
enforced. This leads to a crash caused by a stack overflow.

This patch updates the logic to track both the number of includes as well
as the number of substacks we are on; ultimately adding a new parameter
to track this information.

Signed-off-by: Benny Baumann <email address hidden>

e8bda3c... by "Dmitry V. Levin" <email address hidden>

ci: add --enable-debug jobs to the ci matrix

ea5722f... by Benny Baumann <email address hidden>

libpam: mark debug output functions as potentially unused

Marking the functions _pam_output_debug and _pam_output_debug_info as
potentially unused reduces the noise when compiling in debug mode.

The warning is produced whenever _pam_macros.h is included, but no
debug output is produced by the module. Just marking the function
as static inline, which would have a similar effect, does not work
for various reasons and instead produces new issues instead.

Thus silencing this warning by telling the compiler about our intentions
with these functions is the better approach.

Signed-off-by: Benny Baumann <email address hidden>

a3cef68... by Benny Baumann <email address hidden>

libpam: mark _pam_output_debug as printf-style function

Marking _pam_output_debug as printf-style function allows the compiler to
check for potential errors at places where this function is called, like
mismatches in the argument types or insufficient number of arguments.

Signed-off-by: Benny Baumann <email address hidden>

e5e0985... by Benny Baumann <email address hidden>

pam_unix: avoid integer truncation in debug output

When printing the current day and when the password was last changed,
a truncation of the value could happen due to incorrect data types used
in the format string.

Signed-off-by: Benny Baumann <email address hidden>

849f971... by Benny Baumann <email address hidden>

pam_unix: avoid printing NULL values

The value of pp can potentially be NULL. This handles this case when
printing debug output.

Signed-off-by: Benny Baumann <email address hidden>

a51c2cc... by Benny Baumann <email address hidden>

pam_unix: only output length check message on failure

The debug message was placed outside the password length check and thus
if the length check succeeded no message would have been placed.

Comparing this location with other occurrences indicates this was by mistake,
thus the message is now suppressed if there's nothing to print anyway.

Signed-off-by: Benny Baumann <email address hidden>

320fd5f... by Benny Baumann <email address hidden>

pam_time: ensure correct argument type when printing debug output

While the underlying type for setting the service was correct, the
additional output neglected to include the type cast necessary when
actually printing the data. This is rectified here.

Signed-off-by: Benny Baumann <email address hidden>