pam_lastlog
Arthur Mesh
amesh at juniper.net
Thu Jul 24 15:27:39 UTC 2014
On Thu, Jul 24, 2014 at 01:33:37PM +0200, Dag-Erling Smorgrav wrote:
> Arthur Mesh <amesh at juniper.net> writes:
> > Here is a proposed change where that adds a knob to disable this lookup:
>
> Why not just remove it altogether?
Here is a diff to remove it altogether:
Index: lib/libpam/modules/pam_lastlog/pam_lastlog.c
===================================================================
--- lib/libpam/modules/pam_lastlog/pam_lastlog.c (revision 269064)
+++ lib/libpam/modules/pam_lastlog/pam_lastlog.c (working copy)
@@ -49,7 +49,6 @@
#include <sys/time.h>
#include <paths.h>
-#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
@@ -68,7 +67,6 @@
pam_sm_open_session(pam_handle_t *pamh, int flags,
int argc __unused, const char *argv[] __unused)
{
- struct passwd *pwd;
struct utmpx *utx, utl;
time_t t;
const char *user;
@@ -79,7 +77,7 @@
pam_err = pam_get_user(pamh, &user, NULL);
if (pam_err != PAM_SUCCESS)
return (pam_err);
- if (user == NULL || (pwd = getpwnam(user)) == NULL)
+ if (user == NULL)
return (PAM_SERVICE_ERR);
PAM_LOG("Got user: %s", user);
--
Arthur Mesh <amesh at juniper.net>
Juniper Networks
+1 408 936-4968
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 648 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20140724/705034fe/attachment.sig>
More information about the freebsd-arch
mailing list