Merge Bandie's modifications

This commit is contained in:
Jordy Dickinson 2018-03-28 15:46:03 -04:00
commit 29eca690bf
No known key found for this signature in database
GPG Key ID: C809BAD019EEB620
4 changed files with 9 additions and 12 deletions

View File

@ -57,5 +57,5 @@ See `man 8 pam_panic` for more.
## TODO ## TODO
- Manpage translations - [Manpage translations](https://github.com/Bandie/pam_panic/issues?q=is%3Aissue+is%3Aopen+label%3Alocalization)
- Integrate panic password(?) - Integrate [panic password](https://github.com/Bandie/pam_panic/issues/7)

View File

@ -93,12 +93,9 @@ Die Ger\(:ate-UUID, bei dem der luksHeaders zerst\(:ort werden w\(:urde, sobald
.PP .PP
.SH "WIE WENDE ICH ES AN" .SH "ANWENDUNG"
.PP .PP
Um das Modul anzuwenden, m\(:ussen eine oder mehrere Dateien in \fI/etc/pam.d/\fR\& ver\(:andert werden\&. Um das Modul zu aktivieren, muss PAM konfiguriert werden\&. Siehe dazu \fBpam\&.conf(5)\fR\&.
Dort sind verschiendene (Dienst-)Programme und andere Konfigurationsdateien ersichtlich, die das PAM modul verwenden\&.
Falls Ubuntu verwendet wird, so k\(:onnte die Datei "\fIcommon-auth\fR" interessant sein.
Informationen zur Handhabung der pam.d-Konfigurationsdateien ist es anzuraten, das Wiki der jeweiligen Distribution zu konsultieren\&.
.PP .PP
Man f\(:uge folgende beispielhafte Zeilen am Anfang einer Konfigurationsdatei hinzu: Man f\(:uge folgende beispielhafte Zeilen am Anfang einer Konfigurationsdatei hinzu:
.PD 0 .PD 0
@ -155,7 +152,7 @@ Fehlerberichte (m\(:oglichst auf Englisch) und Codeverbesserungen k\(:onnen hier
.SH "SIEHE AUCH" .SH "SIEHE AUCH"
.PP .PP
\fBcryptsetup\fR(8), \fBcryptsetup\fR(8),
\fBpam.d\fR(5), \fBpam\&.conf\fR(5),
\fBpam\fR(8)\&. \fBpam\fR(8)\&.

View File

@ -53,7 +53,7 @@ See \fBHOW TO DETERMINE MY UUIDS\fR for details\&.
\fBreject=\fR\fB\fIUUID(GPT)\fR\fR (required) \fBreject=\fR\fB\fIUUID(GPT)\fR\fR (required)
.RS 4 .RS 4
The UUID of the device to be used in emergencies. The presence of this device will trigger \fBreboot\fR, \fBpoweroff\fR and/or the panic function, depending on whether \fBreboot\fB, \fBpoweroff\fB, and/or \fBserious\fB are specified. The UUID of the device to be used in emergencies. The presence of this device will trigger \fBreboot\fR, \fBpoweroff\fR and/or the panic function, depending on whether \fBreboot\fR, \fBpoweroff\fR, and/or \fBserious\fR are specified.
.PD 0 .PD 0
.PP .PP
.PD 1 .PD 1

View File

@ -65,13 +65,13 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, cons
// Argument handling // Argument handling
for(int i=0; i<argc; i++){ for(int i=0; i<argc; i++){
if(strstr(argv[i], "allow") != NULL){ if(strstr(argv[i], "allow") != NULL){
strcpy(allowed_arg, argv[i]); strncpy(allowed_arg, argv[i], 128);
allowed_temp = strtok(allowed_arg, "="); allowed_temp = strtok(allowed_arg, "=");
allowed_temp = strtok(NULL, "="); allowed_temp = strtok(NULL, "=");
} }
if(strstr(argv[i], "reject") != NULL){ if(strstr(argv[i], "reject") != NULL){
strcpy(rejected_arg, argv[i]); strncpy(rejected_arg, argv[i], 128);
rejected_temp = strtok(rejected_arg, "="); rejected_temp = strtok(rejected_arg, "=");
rejected_temp = strtok(NULL, "="); rejected_temp = strtok(NULL, "=");
} }
@ -85,7 +85,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, cons
} }
if(strstr(argv[i], "serious") != NULL){ if(strstr(argv[i], "serious") != NULL){
strcpy(serious_arg, argv[i]); strncpy(serious_arg, argv[i], 128);
serious_temp = strtok(serious_arg, "="); serious_temp = strtok(serious_arg, "=");
serious_temp = strtok(NULL, "="); serious_temp = strtok(NULL, "=");
serious = 1; serious = 1;