Skip to content

Commit

Permalink
Merge pull request #105 from Bandie/master
Browse files Browse the repository at this point in the history
Fixing disimprovement of 0.3.2 (#101)
  • Loading branch information
Bandie committed Dec 23, 2018
2 parents 00372dc + 515791b commit 249e222
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 34 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [0.3.3]
- Bugfix for 0.3.2: Fixing disimprovement.

## [0.3.2]
- Bugfix: Media devices are working again

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_INIT(
[pam_panic],
[0.3.2],
[0.3.3],
[https://github.com/pampanic/pam_panic/issues],
[pam_panic])
AC_CONFIG_AUX_DIR([build-aux])
Expand Down
6 changes: 3 additions & 3 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pam_panic 0.2.0\n"
"Report-Msgid-Bugs-To: https://github.com/pampanic/pam_panic\n"
"POT-Creation-Date: 2018-12-23 15:26+0100\n"
"POT-Creation-Date: 2018-12-23 16:43+0100\n"
"PO-Revision-Date: 2018-11-14 17:26+0100\n"
"Last-Translator: Bandie <bandie@chaospott.de>\n"
"Language-Team: German\n"
Expand All @@ -23,15 +23,15 @@ msgstr ""
msgid "CRITICAL: Problem with regcomp."
msgstr "CRITICAL: Problem mit regcomp."

#: src/pam_panic/pam_panic.c:147
#: src/pam_panic/pam_panic.c:149
msgid ""
"ERROR: Arguments invalid. Note that \"allow\" and \"reject\" must have a "
"valid GPT UUID."
msgstr ""
"ERROR: Argument ungültig. Hinweis: \"allow\" und \"reject\" müssen eine "
"valide GPT UUID aufweisen."

#: src/pam_panic/pam_panic.c:186
#: src/pam_panic/pam_panic.c:188
msgid "ALERT for argument \"serious\": Device doesn't exist."
msgstr "ALERT für Argument \"serious\": Gerät existiert nicht."

Expand Down
6 changes: 3 additions & 3 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pam_panic 0.2.0\n"
"Report-Msgid-Bugs-To: https://github.com/pampanic/pam_panic\n"
"POT-Creation-Date: 2018-12-23 15:26+0100\n"
"POT-Creation-Date: 2018-12-23 16:43+0100\n"
"PO-Revision-Date: 2018-11-14 17:26+0100\n"
"Last-Translator: Dangered wolf <d@ngeredwolf.me>\n"
"Language-Team: Spanish\n"
Expand All @@ -23,15 +23,15 @@ msgstr ""
msgid "CRITICAL: Problem with regcomp."
msgstr "CRITICAL: Problema con regcomp."

#: src/pam_panic/pam_panic.c:147
#: src/pam_panic/pam_panic.c:149
msgid ""
"ERROR: Arguments invalid. Note that \"allow\" and \"reject\" must have a "
"valid GPT UUID."
msgstr ""
"ERROR: Argumentos inválidos. Tenga en cuenta que \"allow\" y \"reject\" "
"deben tener un UUID de GPT válido."

#: src/pam_panic/pam_panic.c:186
#: src/pam_panic/pam_panic.c:188
msgid "ALERT for argument \"serious\": Device doesn't exist."
msgstr "ALERT para el argumento \"serious\": El dispositivo no existe."

Expand Down
6 changes: 3 additions & 3 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pam_panic 0.2.0\n"
"Report-Msgid-Bugs-To: https://github.com/pampanic/pam_panic\n"
"POT-Creation-Date: 2018-12-23 15:26+0100\n"
"POT-Creation-Date: 2018-12-23 16:43+0100\n"
"PO-Revision-Date: 2018-11-14 17:26+0100\n"
"Last-Translator: Dashie <dashie@otter.sh>\n"
"Language-Team: French\n"
Expand All @@ -22,15 +22,15 @@ msgstr ""
msgid "CRITICAL: Problem with regcomp."
msgstr "CRITIQUE: Problème avec regcomp."

#: src/pam_panic/pam_panic.c:147
#: src/pam_panic/pam_panic.c:149
msgid ""
"ERROR: Arguments invalid. Note that \"allow\" and \"reject\" must have a "
"valid GPT UUID."
msgstr ""
"ERREUR: Arguments invalides. Notez que \"allow\" et \"reject\" doivent avoir "
"un UUID GPT valide."

#: src/pam_panic/pam_panic.c:186
#: src/pam_panic/pam_panic.c:188
msgid "ALERT for argument \"serious\": Device doesn't exist."
msgstr "ALERTE pour l'argument \"serious\" : Le périphérique n'existe pas."

Expand Down
6 changes: 3 additions & 3 deletions po/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pam_panic 0.2.0\n"
"Report-Msgid-Bugs-To: https://github.com/pampanic/pam_panic\n"
"POT-Creation-Date: 2018-12-23 15:26+0100\n"
"POT-Creation-Date: 2018-12-23 16:43+0100\n"
"PO-Revision-Date: 2018-11-29 19:47+0100\n"
"Last-Translator: Chromium Neptune <chromium@neplanet.com>\n"
"Language-Team: Japanese\n"
Expand All @@ -22,15 +22,15 @@ msgstr ""
msgid "CRITICAL: Problem with regcomp."
msgstr "クリティカル: \"regcomp\"の問題"

#: src/pam_panic/pam_panic.c:147
#: src/pam_panic/pam_panic.c:149
msgid ""
"ERROR: Arguments invalid. Note that \"allow\" and \"reject\" must have a "
"valid GPT UUID."
msgstr ""
"エラー: 引き数が無効です。 \"allow\"\"reject\"には有効なGPT UUIDが必要で"
"す。"

#: src/pam_panic/pam_panic.c:186
#: src/pam_panic/pam_panic.c:188
msgid "ALERT for argument \"serious\": Device doesn't exist."
msgstr "引数 \"serious\"のアラート:デバイスが存在しません。"

Expand Down
6 changes: 3 additions & 3 deletions po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pam_panic 0.2.0\n"
"Report-Msgid-Bugs-To: https://github.com/pampanic/pam_panic\n"
"POT-Creation-Date: 2018-12-23 15:26+0100\n"
"POT-Creation-Date: 2018-12-23 16:43+0100\n"
"PO-Revision-Date: 2018-11-23 23:50+0100\n"
"Last-Translator: chris <chris@heychris.eu>\n"
"Language-Team: \n"
Expand All @@ -22,15 +22,15 @@ msgstr ""
msgid "CRITICAL: Problem with regcomp."
msgstr "KRITISCH: Probleem met regcomp."

#: src/pam_panic/pam_panic.c:147
#: src/pam_panic/pam_panic.c:149
msgid ""
"ERROR: Arguments invalid. Note that \"allow\" and \"reject\" must have a "
"valid GPT UUID."
msgstr ""
"FOUT: Argumenten niet geldig. Let erop dat \"allow\" en \"reject\" een "
"geldige GPT UUID nodig hebben."

#: src/pam_panic/pam_panic.c:186
#: src/pam_panic/pam_panic.c:188
msgid "ALERT for argument \"serious\": Device doesn't exist."
msgstr "WAARSCHUWING bij argument \"serious\": Toestel bestaat niet."

Expand Down
8 changes: 4 additions & 4 deletions po/pam_panic.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: pam_panic 0.3.1\n"
"Project-Id-Version: pam_panic 0.3.3\n"
"Report-Msgid-Bugs-To: https://github.com/pampanic/pam_panic\n"
"POT-Creation-Date: 2018-12-23 15:26+0100\n"
"POT-Creation-Date: 2018-12-23 16:43+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -21,13 +21,13 @@ msgstr ""
msgid "CRITICAL: Problem with regcomp."
msgstr ""

#: src/pam_panic/pam_panic.c:147
#: src/pam_panic/pam_panic.c:149
msgid ""
"ERROR: Arguments invalid. Note that \"allow\" and \"reject\" must have a "
"valid GPT UUID."
msgstr ""

#: src/pam_panic/pam_panic.c:186
#: src/pam_panic/pam_panic.c:188
msgid "ALERT for argument \"serious\": Device doesn't exist."
msgstr ""

Expand Down
30 changes: 16 additions & 14 deletions src/pam_panic/pam_panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,23 @@ void constrPath(char **dst, char **src, int8_t bGPTOnly){
// GPT
strcpy(tmp, "/dev/disk/by-partuuid/");
strcat(tmp, *src);
if(access(tmp, F_OK) != -1 || bGPTOnly)
if(access(tmp, F_OK) != -1 || bGPTOnly){
sprintf(*dst, "/dev/disk/by-partuuid/%s", *src);
return;

// MBR
memset(tmp, 0, sizeof tmp);
strcat(tmp, "/dev/disk/by-uuid/");
strcat(tmp, *src);
if(access(tmp, F_OK) != -1)
sprintf(*dst, "/dev/disk/by-uuid/%s", *src);
return;
} else{

// MBR
memset(tmp, 0, sizeof tmp);
strcat(tmp, "/dev/disk/by-uuid/");
strcat(tmp, *src);
if(access(tmp, F_OK) != -1){
sprintf(*dst, "/dev/disk/by-uuid/%s", *src);
} else {

// Fallback vendor hardware id
sprintf(*dst, "/dev/disk/by-id/%s", *src);
}

// Fallback vendor hardware id
sprintf(*dst, "/dev/disk/by-id/%s", *src);
return;
}

}

Expand Down Expand Up @@ -181,7 +183,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, cons



// Check if panic key exist
// Check if device to be destroyed exist
if(bSerious && access(serious_dev, F_OK) == -1){
pam_syslog(pamh, LOG_ALERT, _("ALERT for argument \"serious\": Device doesn't exist."));
if(bStrict)
Expand Down

0 comments on commit 249e222

Please sign in to comment.