49cb564d14
* par is kept at -Np0 ```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
34 lines
1 KiB
Diff
34 lines
1 KiB
Diff
From: https://sourceforge.net/p/pam-mount/pam-mount/ci/d4434c05e7c0cf05d87089404cfa2deedc60811a/tree/src/crypto-dmc.c?diff=e47b8ee42f14926b013a78cc487b794059edccff
|
|
--- a/src/crypto-dmc.c
|
|
+++ b/src/crypto-dmc.c
|
|
@@ -21,6 +21,12 @@
|
|
#include "libcryptmount.h"
|
|
#include "pam_mount.h"
|
|
|
|
+#ifndef CRYPT_LUKS
|
|
+ #define CRYPT_LUKS NULL /* Passing NULL to crypt_load will
|
|
+ default to LUKS(1) on older
|
|
+ libcryptsetup versions. */
|
|
+#endif
|
|
+
|
|
/**
|
|
* dmc_is_luks - check if @path points to a LUKS volume (cf. normal dm-crypt)
|
|
* @path: path to the crypto container
|
|
@@ -48,7 +54,7 @@
|
|
|
|
ret = crypt_init(&cd, device);
|
|
if (ret == 0) {
|
|
- ret = crypt_load(cd, CRYPT_LUKS1, NULL);
|
|
+ ret = crypt_load(cd, CRYPT_LUKS, NULL);
|
|
if (ret == -EINVAL)
|
|
ret = false;
|
|
else if (ret == 0)
|
|
@@ -106,7 +112,7 @@
|
|
#endif
|
|
}
|
|
|
|
- ret = crypt_load(cd, CRYPT_LUKS1, NULL);
|
|
+ ret = crypt_load(cd, CRYPT_LUKS, NULL);
|
|
if (ret == 0) {
|
|
ret = crypt_activate_by_passphrase(cd, mt->crypto_name,
|
|
CRYPT_ANY_SLOT, req->key_data, req->key_size, flags);
|