Open
pam_unix: enclose macro arguments #152
jia-wenhao1017Add on Apr 21, 2025
pam_unix: enclose macro arguments #152
Open
Merged fromrefs/pull/152/headintoopenEuler-24.03-LTS-SP1
Total: 2 files changed+41-1
| @@ -0,0 +1,36 @@ | |||
| 1 | +From 9ba1de39ffcfca6665bdb36116810c445ab88147 Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: jiawenhao <jiawenhao@xfusion.com> | ||
| 3 | +Date: Mon, 21 Apr 2025 17:01:51 +0800 | ||
| 4 | +Subject: [PATCH] enclose-macro-arguments | ||
| 5 | + | ||
| 6 | +--- | ||
| 7 | + modules/pam_unix/support.h | 6 +++--- | ||
| 8 | + 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 9 | + | ||
| 10 | +diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h | ||
| 11 | +index b5712b5..23d77c3 100644 | ||
| 12 | +--- a/modules/pam_unix/support.h | ||
| 13 | ++++ b/modules/pam_unix/support.h | ||
| 14 | +@@ -31,7 +31,7 @@ typedef struct { | ||
| 15 | + * macro to determine if a given flag is on | ||
| 16 | + */ | ||
| 17 | + | ||
| 18 | +-#define on(x,ctrl) (unix_args[x].flag & ctrl) | ||
| 19 | ++#define on(x,ctrl) (unix_args[x].flag & (ctrl)) | ||
| 20 | + | ||
| 21 | + /* | ||
| 22 | + * macro to determine that a given flag is NOT on | ||
| 23 | +@@ -43,8 +43,8 @@ typedef struct { | ||
| 24 | + * macro to turn on/off a ctrl flag manually | ||
| 25 | + */ | ||
| 26 | + | ||
| 27 | +-#define set(x,ctrl) (ctrl = ((ctrl)&unix_args[x].mask)|unix_args[x].flag) | ||
| 28 | +-#define unset(x,ctrl) (ctrl &= ~(unix_args[x].flag)) | ||
| 29 | ++#define set(x,ctrl) ((ctrl) = ((ctrl)&unix_args[x].mask)|unix_args[x].flag) | ||
| 30 | ++#define unset(x,ctrl) ((ctrl) &= ~(unix_args[x].flag)) | ||
| 31 | + | ||
| 32 | + /* the generic mask */ | ||
| 33 | + | ||
| 34 | +-- | ||
| 35 | +2.27.0 | ||
| 36 | + | ||
| @@ -4,7 +4,7 @@ | |||
| 4 | %define _pamconfdir %{_sysconfdir}/pam.d | 4 | %define _pamconfdir %{_sysconfdir}/pam.d |
| 5 | Name: pam | 5 | Name: pam |
| 6 | Version: 1.5.3 | 6 | Version: 1.5.3 |
| 7 | -Release: 8 | 7 | +Release: 9 |
| 8 | Summary: Pluggable Authentication Modules for Linux | 8 | Summary: Pluggable Authentication Modules for Linux |
| 9 | License: BSD and GPLv2+ | 9 | License: BSD and GPLv2+ |
| 10 | URL: http://www.linux-pam.org/ | 10 | URL: http://www.linux-pam.org/ |
| @@ -28,6 +28,7 @@ Patch5: backport-CVE-2024-10963.patch | |||
| 28 | Patch6: backport-CVE-2024-10041.patch | 28 | Patch6: backport-CVE-2024-10041.patch |
| 29 | Patch7: backport-CVE-2024-10041-pam_unix-try-to-set-uid-to-0-for-unix_chkpwd.patch | 29 | Patch7: backport-CVE-2024-10041-pam_unix-try-to-set-uid-to-0-for-unix_chkpwd.patch |
| 30 | Patch8: backport-libpam-use-close_range-to-close-file-descriptors.patch | 30 | Patch8: backport-libpam-use-close_range-to-close-file-descriptors.patch |
| 31 | +Patch9: backport-enclose-macro-arguments.patch | ||
| 31 | 32 | ||
| 32 | Patch9000:change-ndbm-to-gdbm.patch | 33 | Patch9000:change-ndbm-to-gdbm.patch |
| 33 | Patch9001:add-sm3-crypt-support.patch | 34 | Patch9001:add-sm3-crypt-support.patch |
| @@ -182,6 +183,9 @@ make check | |||
| 182 | 183 | ||
| 183 | 184 | ||
| 184 | %changelog | 185 | %changelog |
| 186 | +* Mon Apr 21 2025 jiawenhao <jiawenhao@xfusion.com> - 1.5.3-9 | ||
| 187 | +- backport enclose macro arguments | ||
| 188 | + | ||
| 185 | * Mon Mar 24 2025 hugel <gengqihu2@h-partners.com> - 1.5.3-8 | 189 | * Mon Mar 24 2025 hugel <gengqihu2@h-partners.com> - 1.5.3-8 |
| 186 | - backport patch libpam use close_range() to close file descriptors | 190 | - backport patch libpam use close_range() to close file descriptors |
| 187 | 191 | ||