Cleaning up headers/using them properly

This commit is contained in:
Bandie 2018-09-28 21:00:16 +02:00
parent 3aec1b8270
commit 32159b8689
Signed by: Bandie
GPG Key ID: C1E133BC65A822DD
9 changed files with 18 additions and 26 deletions

View File

@ -6,6 +6,8 @@ DATE : 2018-03-27T02:34:08+02:00
LICENSE : GNU-GPLv3
*/
#include "pam_panic.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View File

@ -1,27 +1,15 @@
/*
FILENAME : pam_panic.c
DESCRIPTION : Header is made for testing purposes.
FILENAME : pam_panic.h
DESCRIPTION : Header.
AUTHOR : Bandie
DATE : 2018-03-27T02:34:08+02:00
LICENSE : GNU-GPLv3
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <regex.h>
#include <string.h>
#include <security/pam_modules.h>
#include <security/pam_ext.h>
#include <syslog.h>
#include "../../lib/gettext.h"
#include "pam_panic_reject.h"
#include "pam_panic_authdevice.h"
#include "pam_panic_password.h"
void argSplit(char **some_arg, char **some_temp, const char *arg);

View File

@ -6,12 +6,10 @@ DATE : 2018-03-27T02:34:08+02:00
LICENSE : GNU-GPLv3
*/
#include "pam_panic_authdevice.h"
#include <stdint.h>
#include <unistd.h>
#include "../config.h"
#include "../../lib/gettext.h"
#include <security/pam_modules.h>
#include <security/pam_ext.h>

View File

@ -6,5 +6,7 @@ LICENSE : GNU-GPLv3
*/
#include "../config.h"
#include <stdint.h>
#include <security/pam_modules.h>
int authDevice(pam_handle_t *pamh, char *allowed, char *rejected, char *serious_dev, int8_t bSerious, int8_t bReboot, int8_t bPoweroff);

View File

@ -6,20 +6,18 @@ DATE : 2018-03-27T02:34:08+02:00
LICENSE : GNU-GPLv3
*/
#include "pam_panic_password.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include "../config.h"
#include "../../lib/gettext.h"
#include <security/pam_modules.h>
#include <security/pam_ext.h>
#include <syslog.h>
#include <crypt.h>
#include "pam_panic_password.h"
#include "pam_panic_reject.h"
#define _(String) gettext(String)

View File

@ -5,7 +5,10 @@ DATE : 2018-03-27T02:34:08+02:00
LICENSE : GNU-GPLv3
*/
#include "config.h"
#include "../config.h"
#include <stdint.h>
#include <security/pam_modules.h>
#include <security/pam_ext.h>
#ifndef PPASSFILE
#error PPASSFILE must be declared!

View File

@ -6,7 +6,7 @@ DATE : 2018-03-27T02:34:08+02:00
LICENSE : GNU-GPLv3
*/
#include <stdint.h>
#include "pam_panic_reject.h"
#include <unistd.h>
#ifdef TEST
#include <stdio.h>
@ -14,8 +14,6 @@ LICENSE : GNU-GPLv3
#include <security/pam_ext.h>
#endif
#include <sys/wait.h>
#include "config.h"
#include "pam_panic_reject.h"
int reject(char *serious_dev, int8_t bSerious, int8_t bReboot, int8_t bPoweroff){
if(bSerious){

View File

@ -5,4 +5,7 @@ DATE : 2018-03-27T02:34:08+02:00
LICENSE : GNU-GPLv3
*/
#include "../config.h"
#include <stdint.h>
int reject(char *serious_dev, int8_t bSerious, int8_t bReboot, int8_t bPoweroff);

View File

@ -7,7 +7,7 @@ LICENSE : GNU-GPLv3
*/
#include "pam_panic_pw.h"
#include <stdio.h>
#include <stdlib.h>