Compare commits
10 Commits
216e1670c3
...
fe2f22cd38
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe2f22cd38 | ||
|
|
aef93aad97 | ||
|
|
3c2d66489f | ||
|
|
ada997b4c7 | ||
|
|
ebec023df9 | ||
|
|
53aafc4954 | ||
|
|
3578c8c127 | ||
|
|
3cee78d4cc | ||
|
|
abd6cef499 | ||
|
|
d1aa09d8e4 |
80
Fix-compilation-error-on-sw64-arch.patch
Normal file
80
Fix-compilation-error-on-sw64-arch.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
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 fe6ee838e..76ce6e959 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 a193e5561..a15101a90 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
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ sudo_secureware_init(const struct sudoers_context *ctx, struct passwd *pw,
|
||||||
|
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
|
||||||
|
@@ -83,7 +83,7 @@ sudo_secureware_verify(const struct sudoers_context *ctx, struct passwd *pw,
|
||||||
|
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 dd5092d72..0b48cb8f7 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
|
||||||
|
|
||||||
Binary file not shown.
BIN
sudo-1.9.15p5.tar.gz
Normal file
BIN
sudo-1.9.15p5.tar.gz
Normal file
Binary file not shown.
21
sudo.spec
21
sudo.spec
@ -1,6 +1,6 @@
|
|||||||
Name: sudo
|
Name: sudo
|
||||||
Version: 1.9.12p2
|
Version: 1.9.15p5
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: Allows restricted root access for specified users
|
Summary: Allows restricted root access for specified users
|
||||||
License: ISC
|
License: ISC
|
||||||
URL: https://www.sudo.ws
|
URL: https://www.sudo.ws
|
||||||
@ -10,6 +10,8 @@ Source1: sudoers
|
|||||||
Source2: sudo
|
Source2: sudo
|
||||||
Source3: sudo-i
|
Source3: sudo-i
|
||||||
|
|
||||||
|
Patch0: Fix-compilation-error-on-sw64-arch.patch
|
||||||
|
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Requires: pam
|
Requires: pam
|
||||||
Recommends: vim-minimal
|
Recommends: vim-minimal
|
||||||
@ -153,6 +155,21 @@ chrpath -d $RPM_BUILD_ROOT/usr/libexec/sudo/*
|
|||||||
%exclude %{_pkgdocdir}/ChangeLog
|
%exclude %{_pkgdocdir}/ChangeLog
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 8 2024 wangqingsan <wangqingsan@huawei.com> - 1.9.15p5-1
|
||||||
|
- Upgrade to 1.9.15p5
|
||||||
|
|
||||||
|
* Wed Jul 19 2023 zhoushuiqing <zhoushuiqing2@huawei.com> - 1.9.14p1-1
|
||||||
|
- Upgrade to 1.9.14p1
|
||||||
|
|
||||||
|
* Wed Apr 12 2023 wangyu <wangyu283@huawei.com> - 1.9.12p2-5
|
||||||
|
- Fix compilation error on sw64 arch.
|
||||||
|
|
||||||
|
* Tue Mar 28 2023 wangcheng <wangcheng156@huawei.com> - 1.9.12p2-4
|
||||||
|
- Fix CVE-2023-28486 and CVE-2023-28487
|
||||||
|
|
||||||
|
* Fri Mar 10 2023 wangyu <wangyu283@huawei.com> - 1.9.12p2-3
|
||||||
|
- Fix CVE-2023-27320.
|
||||||
|
|
||||||
* Mon Mar 06 2023 wangyu <wangyu283@huawei.com> - 1.9.12p2-2
|
* Mon Mar 06 2023 wangyu <wangyu283@huawei.com> - 1.9.12p2-2
|
||||||
- Remove -rpath option.
|
- Remove -rpath option.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user