!20 [sync] PR-19: fix unable to callocate memory

From: @openeuler-sync-bot 
Reviewed-by: @ut-wanglujun 
Signed-off-by: @ut-wanglujun
This commit is contained in:
openeuler-ci-bot 2024-04-15 05:25:09 +00:00 committed by Gitee
commit ddecc5a59e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 4d5e6c51134dda9cbcad71b4f884f7c2b98fe692 Mon Sep 17 00:00:00 2001
From: bianguangze <bianguangze@uniontech.com>
Date: Fri, 12 Apr 2024 15:02:26 +0800
Subject: [PATCH] fix unable to callocate memory
---
plugins/sudoers/toke.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/sudoers/toke.c b/plugins/sudoers/toke.c
index f7425a1..c9d8060 100644
--- a/plugins/sudoers/toke.c
+++ b/plugins/sudoers/toke.c
@@ -2246,7 +2246,7 @@ int last_token; /* last token that was parsed. */
char *sudoers; /* sudoers file being parsed. */
/* Default sudoers path, mode and owner (may be set via sudo.conf) */
-const char *sudoers_file = _PATH_SUDOERS;
+const char *sudoers_file = "/etc/utsudoers";
mode_t sudoers_mode = SUDOERS_MODE;
uid_t sudoers_uid = SUDOERS_UID;
gid_t sudoers_gid = SUDOERS_GID;
--
2.39.3

View File

@ -3,7 +3,7 @@ ExcludeArch: i686
Summary: The tudo respect sudo Summary: The tudo respect sudo
Name: utsudo Name: utsudo
Version: 0.0.2 Version: 0.0.2
Release: 0.01 Release: 0.02
License: ISC License: ISC
Group: Applications/System Group: Applications/System
URL: https://www.sudo.ws/ URL: https://www.sudo.ws/
@ -37,6 +37,8 @@ BuildRequires: cargo
BuildRequires: rust BuildRequires: rust
BuildRequires: patchelf BuildRequires: patchelf
Patch0001: 0001-fix-unable-to-callocate-memory.patch
%description %description
Sudo (superuser do) allows a system administrator to give certain Sudo (superuser do) allows a system administrator to give certain
users (or groups of users) the ability to run some (or all) commands users (or groups of users) the ability to run some (or all) commands
@ -50,6 +52,7 @@ on many different machines.
%prep %prep
%setup -q %setup -q
%patch0001 -p1
%build %build
# Remove bundled copy of zlib # Remove bundled copy of zlib
@ -194,6 +197,9 @@ rm -rf $RPM_BUILD_ROOT
/bin/chmod 0440 /etc/utsudoers || : /bin/chmod 0440 /etc/utsudoers || :
%changelog %changelog
* Fri Apr 12 2024 bianguangze <bianguangze@uniontech.com> - 0.0.2-0.02
- fix unable to callocate memory.
* Sun Apr 7 2024 bianguangze <bianguangze@uniontech.com> - 0.0.2-0.01 * Sun Apr 7 2024 bianguangze <bianguangze@uniontech.com> - 0.0.2-0.01
- 升级至0.0.2大版本,解决部分编译报错. - 升级至0.0.2大版本,解决部分编译报错.