代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/sudo 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 505355cce4fcc2c8f1103a88dd707758cba4907f Mon Sep 17 00:00:00 2001
From: zhangzhixin <zhixin.zhang@i-soft.com.cn>
Date: Wed, 12 Apr 2023 11:52:01 +0800
Subject: [PATCH] Fix compilation error on sw64 arch.
---
include/compat/endian.h | 2 +-
plugins/sudoers/auth/secureware.c | 6 +++---
plugins/sudoers/getspwuid.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/compat/endian.h b/include/compat/endian.h
index fe6ee83..76ce6e9 100644
--- a/include/compat/endian.h
+++ b/include/compat/endian.h
@@ -51,7 +51,7 @@
# define BYTE_ORDER LITTLE_ENDIAN
# elif defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__)
# define BYTE_ORDER BIG_ENDIAN
-# elif defined(__alpha__) || defined(__alpha) || defined(__amd64) || \
+# elif defined(__alpha__) || defined(__alpha) || defined(__sw_64__) || defined(__sw_64) || defined(__amd64) || \
defined(BIT_ZERO_ON_RIGHT) || defined(i386) || defined(__i386) || \
defined(MIPSEL) || defined(_MIPSEL) || defined(ns32000) || \
defined(__ns3200) || defined(sun386) || defined(vax) || \
diff --git a/plugins/sudoers/auth/secureware.c b/plugins/sudoers/auth/secureware.c
index 49a4b4e..b47c0b8 100644
--- a/plugins/sudoers/auth/secureware.c
+++ b/plugins/sudoers/auth/secureware.c
@@ -46,7 +46,7 @@
#include "sudoers.h"
#include "sudo_auth.h"
-#ifdef __alpha
+#if defined __alpha || defined __sw_64
extern int crypt_type;
#endif
@@ -59,7 +59,7 @@ sudo_secureware_init(struct passwd *pw, sudo_auth *auth)
if (auth->data != NULL)
debug_return_int(AUTH_SUCCESS);
-#ifdef __alpha
+#if defined __alpha || defined __sw_64
if (crypt_type == INT_MAX)
debug_return_int(AUTH_FAILURE); /* no shadow */
#endif
@@ -81,7 +81,7 @@ sudo_secureware_verify(struct passwd *pw, const char *pass, sudo_auth *auth, str
if (pass[0] == '\0')
debug_return_int(pw_epasswd[0] ? AUTH_FAILURE : AUTH_SUCCESS);
-#if defined(__alpha)
+#if defined(__alpha) || defined(__sw_64)
# ifdef HAVE_DISPCRYPT
epass = dispcrypt(pass, pw_epasswd, crypt_type);
# else
diff --git a/plugins/sudoers/getspwuid.c b/plugins/sudoers/getspwuid.c
index 650b3f3..f31dd5f 100644
--- a/plugins/sudoers/getspwuid.c
+++ b/plugins/sudoers/getspwuid.c
@@ -51,7 +51,7 @@
/*
* Exported for auth/secureware.c
*/
-#if defined(HAVE_GETPRPWNAM) && defined(__alpha)
+#if defined(HAVE_GETPRPWNAM) && (defined(__alpha) || defined(__sw_64))
int crypt_type = INT_MAX;
#endif /* HAVE_GETPRPWNAM && __alpha */
@@ -87,7 +87,7 @@ sudo_getepw(const struct passwd *pw)
struct pr_passwd *spw;
if ((spw = getprpwnam(pw->pw_name)) && spw->ufld.fd_encrypt) {
-# ifdef __alpha
+# if defined __alpha || defined __sw_64
crypt_type = spw->ufld.fd_oldcrypt;
# endif /* __alpha */
epw = spw->ufld.fd_encrypt;
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。