Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
6e332fda43
!25 [sync] PR-24: modify openeuler to _vendor
From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2024-03-26 12:15:20 +00:00
qsw333
46cede5d96 modify openeuler to _vendor
(cherry picked from commit eb3d4032a1eb2a5dbeb026d6fc53184d387283d1)
2024-03-26 16:39:17 +08:00
openeuler-ci-bot
7e0424644b
!18 add util-linux-user require to solve the problem that useinfo cannot be used normally
From: @yuan__xing 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2022-08-07 08:45:07 +00:00
yuanxing
ce73786481 add util-linux-user require to solve the problem that useinfo cannot be used normally
- 添加util-linux-user依赖以解决userinfo工具无法正常使用问题
2022-07-27 16:16:21 +08:00
openeuler-ci-bot
5de122d336
!17 【master分支】update to 1.114
Merge pull request !17 from 杨壮壮/master
2022-02-08 08:03:10 +00:00
yang_zhuang_zhuang
984f7dd6e4 update to 1.114 2022-02-08 09:05:45 +08:00
openeuler-ci-bot
c597724f02 !15 segregated usermode-gtk
From: @jlwwlsqc
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
2021-09-16 11:47:53 +00:00
Zhiqiang Liu
17ed20e0c5 segregated usermode-gtk 2021-09-16 18:51:38 +08:00
openeuler-ci-bot
69ca9cc485 !10 Add gcc to BuildRequires
From: @panxh_purple
Reviewed-by: @overweight
Signed-off-by: @overweight
2021-05-27 18:51:15 +08:00
panxiaohe
4436993904 Add gcc to BuildRequires 2021-05-27 17:03:04 +08:00
4 changed files with 47 additions and 72 deletions

View File

@ -1,58 +0,0 @@
From 1efff28faef83a620fd7f6eaac3fe64ee6691a33 Mon Sep 17 00:00:00 2001
From: Jiri Kucera <jkucera@redhat.com>
Date: Apr 10 2020 09:18:42 +0000
Subject: Merge #7 `Do not use deprecated flask.h and av_permissions.h`
---
diff --git a/userhelper.c b/userhelper.c
index 4177c89..f2afde7 100644
--- a/userhelper.c
+++ b/userhelper.c
@@ -48,8 +48,6 @@
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
-#include <selinux/flask.h>
-#include <selinux/av_permissions.h>
#endif
#include "shvar.h"
@@ -111,7 +109,7 @@ static int checkAccess(unsigned int selaccess) {
struct av_decision avd;
int retval = security_compute_av(user_context,
user_context,
- SECCLASS_PASSWD,
+ string_to_security_class("passwd"),
selaccess,
&avd);
@@ -2267,7 +2265,8 @@ main(int argc, char **argv)
const char *new_home_phone;
const char *new_shell;
#ifdef WITH_SELINUX
- unsigned perm;
+ security_class_t class;
+ access_vector_t perm;
#endif
/* State variable we pass around. */
@@ -2426,12 +2425,13 @@ main(int argc, char **argv)
user_name = g_strdup(argv[optind]);
#ifdef WITH_SELINUX
+ class = string_to_security_class("passwd");
if (c_flag)
- perm = PASSWD__PASSWD;
+ perm = string_to_av_perm(class, "passwd");
else if (s_flag)
- perm = PASSWD__CHSH;
+ perm = string_to_av_perm(class, "chsh");
else
- perm = PASSWD__CHFN;
+ perm = string_to_av_perm(class, "chfn");
if (is_selinux_enabled() > 0 &&
checkAccess(perm)!= 0) {

Binary file not shown.

BIN
usermode-1.114.tar.xz Normal file

Binary file not shown.

View File

@ -1,22 +1,18 @@
Name: usermode
Version: 1.113
Release: 2
Version: 1.114
Release: 3
Summary: Tools for certain user account management tasks
License: GPLv2+
URL: https://pagure.io/usermode/
Source: https://releases.pagure.org/usermode/usermode-%{version}.tar.xz
Source1: config-util
Patch0: Do-not-use-deprecated-flask.h-and-av_permissions.patch
Requires: pam passwd util-linux
Requires: pam passwd util-linux util-linux-user
BuildRequires: gcc
BuildRequires: desktop-file-utils gettext intltool perl-XML-Parser util-linux
BuildRequires: glib2-devel gtk2-devel libblkid-devel libSM-devel libselinux-devel libuser-devel
BuildRequires: pam-devel startup-notification-devel
Provides: %{name}-gtk = %{version}-%{release}
Obsoletes: %{name}-gtk < %{version}-%{release}
%description
usermode contains the userhelper program, which can be used to allow configured
programs to be run with superuser privileges by ordinary users, and several
@ -25,6 +21,19 @@ graphical tools for users:
* usermount lets users mount, unmount, and format filesystems.
* userpasswd allows users to change their passwords.
%package gtk
Summary: Graphical tools for certain user account management tasks
Requires: %{name} = %{version}-%{release}
%description gtk
The usermode-gtk package contains several graphical tools for users:
userinfo, usermount and userpasswd. Userinfo allows users to change
their finger information. Usermount lets users mount, unmount, and
format file systems. Userpasswd allows users to change their
passwords.
Install the usermode-gtk package if you would like to provide users with
graphical tools for certain account management tasks.
%package help
Summary: Man pages for usermode
@ -37,11 +46,11 @@ Package help includes man pages for usermode.
%build
%configure --with-selinux
%make_build VENDOR=openeuler
%make_build VENDOR=%{_vendor}
%install
%make_install VENDOR=openeuler
%make_install VENDOR=%{_vendor}
# make userformat symlink to usermount
%{__ln_s} usermount %{buildroot}%{_bindir}/userformat
@ -49,9 +58,9 @@ Package help includes man pages for usermode.
install -D -p -m 644 %{SOURCE1} %{buildroot}/etc/security/console.apps/config-util
for i in openeuler-userinfo.desktop openeuler-userpasswd.desktop openeuler-usermount.desktop; do
for i in %{_vendor}-userinfo.desktop %{_vendor}-userpasswd.desktop %{_vendor}-usermount.desktop; do
echo 'NotShowIn=GNOME;KDE;' >>%{buildroot}%{_datadir}/applications/$i
desktop-file-install --vendor openeuler --delete-original \
desktop-file-install --vendor %{_vendor} --delete-original \
--dir %{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/applications/$i
done
@ -61,17 +70,41 @@ done
%files -f %{name}.lang
%doc COPYING ChangeLog NEWS README
%attr(4711,root,root) /usr/sbin/userhelper
%{_bindir}/*
%{_bindir}/consolehelper
%{_datadir}/usermode
%config(noreplace) /etc/security/console.apps/config-util
%files gtk
%{_bindir}/usermount
%{_bindir}/userformat
%{_bindir}/userinfo
%{_bindir}/userpasswd
%{_bindir}/consolehelper-gtk
%{_bindir}/pam-panel-icon
%{_datadir}/%{name}
%{_datadir}/pixmaps/*
%{_datadir}/applications/*
%config(noreplace) /etc/security/console.apps/config-util
%files help
%{_mandir}/man1/*
%{_mandir}/man8/*
%changelog
* Tue Mar 26 2024 wangqingsan <wangqingsan@huawei.com> - 1.114-3
- modify openeuler to _vendor
* Wed Jul 27 2022 yuanxing <yuanxing@kylinsec.com.cn> - 1.114-2
- add util-linux-user require to solve the problem that useinfo cannot be used normally
* Tue Feb 8 2022 yangzhuangzhuang <yangzhuangzhuang1@h-partners.com> - 1.114-1
- update to 1.114
* Thu Sep 16 2021 wangjie <wangjie375@huawei.com> - 1.113-4
- segregated usermode-gtk
* Thu May 27 2021 panxiaohe <panxiaohe@huawei.com> - 1.113-3
- Add gcc to BuildRequires
* Thu Jul 30 2020 shenyangyang <shenyangyang4@huawei.com> - 1.113-2
- Do not use deprecated flask.h and av_permissions