login: pam_misc is not needed (#72)

The pam_misc header and library, as well as the pam_{modules,modutil}.h,
are not needed.  Meanwhile add the necessary headers.

Builds fine on both Linux and DragonFly BSD.
This commit is contained in:
Aaron LI 2018-10-05 23:23:57 +08:00 committed by Cylgom
parent 04580c6ff0
commit b0ce2ed635
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ OBJD=obj
RESD=res RESD=res
LANG=$(RESD)/lang LANG=$(RESD)/lang
INCL=-I$(SRCD) -I$(SUBD)/termbox-next/src -I$(SUBD)/inih INCL=-I$(SRCD) -I$(SUBD)/termbox-next/src -I$(SUBD)/inih
LINK=-lm -lpam -lpam_misc LINK=-lm -lpam
SRCS=$(SRCD)/main.c SRCS=$(SRCD)/main.c
SRCS+=$(SRCD)/draw.c SRCS+=$(SRCD)/draw.c

View File

@ -7,22 +7,22 @@
#include <sys/types.h> #include <sys/types.h>
#include <grp.h> #include <grp.h>
#include <pwd.h> #include <pwd.h>
#include <paths.h> /* _PATH_MAILDIR */
#include <signal.h> #include <signal.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <security/pam_appl.h> #include <security/pam_appl.h>
#include <security/pam_misc.h>
#ifdef LY_SYSTEMD #ifdef LY_SYSTEMD
#define PAM_SYSTEMD #define PAM_SYSTEMD
#endif #endif
#include <security/pam_modules.h>
#include <security/pam_modutil.h>
int login_conv(int num_msg, const struct pam_message** msg, int login_conv(int num_msg, const struct pam_message** msg,
struct pam_response** resp, void* appdata_ptr) struct pam_response** resp, void* appdata_ptr)
{ {