2.23.2-3: #987787
This commit is contained in:
parent
706e746809
commit
2cfecf3529
|
@ -0,0 +1,48 @@
|
||||||
|
diff -up util-linux-2.23.2/login-utils/su-common.c.kzak util-linux-2.23.2/login-utils/su-common.c
|
||||||
|
--- util-linux-2.23.2/login-utils/su-common.c.kzak 2013-07-30 10:39:26.223738407 +0200
|
||||||
|
+++ util-linux-2.23.2/login-utils/su-common.c 2013-09-09 09:32:05.497238691 +0200
|
||||||
|
@@ -111,6 +111,9 @@ static int same_session = 0;
|
||||||
|
/* SU_MODE_{RUNUSER,SU} */
|
||||||
|
static int su_mode;
|
||||||
|
|
||||||
|
+/* Don't print PAM info messages (Last login, etc.). */
|
||||||
|
+static int suppress_pam_info;
|
||||||
|
+
|
||||||
|
static bool _pam_session_opened;
|
||||||
|
static bool _pam_cred_established;
|
||||||
|
static sig_atomic_t volatile caught_signal = false;
|
||||||
|
@@ -208,10 +211,23 @@ static void log_btmp(struct passwd const
|
||||||
|
updwtmp(_PATH_BTMP, &ut);
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
+static int su_pam_conv(int num_msg, const struct pam_message **msg,
|
||||||
|
+ struct pam_response **resp, void *appdata_ptr)
|
||||||
|
+{
|
||||||
|
+ if (suppress_pam_info
|
||||||
|
+ && num_msg == 1
|
||||||
|
+ && msg
|
||||||
|
+ && msg[0]->msg_style == PAM_TEXT_INFO)
|
||||||
|
+ return PAM_SUCCESS;
|
||||||
|
+
|
||||||
|
+ return misc_conv(num_msg, msg, resp, appdata_ptr);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static struct pam_conv conv =
|
||||||
|
{
|
||||||
|
- misc_conv,
|
||||||
|
- NULL
|
||||||
|
+ su_pam_conv,
|
||||||
|
+ NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
@@ -902,6 +918,9 @@ su_main (int argc, char **argv, int mode
|
||||||
|
|
||||||
|
init_groups (pw, groups, num_supp_groups);
|
||||||
|
|
||||||
|
+ if (!simulate_login || command)
|
||||||
|
+ suppress_pam_info = 1; /* don't print PAM info messages */
|
||||||
|
+
|
||||||
|
create_watching_parent ();
|
||||||
|
/* Now we're in the child. */
|
|
@ -77,8 +77,10 @@ Requires: libmount = %{version}-%{release}
|
||||||
# 151635 - makeing /var/log/lastlog
|
# 151635 - makeing /var/log/lastlog
|
||||||
Patch0: 2.23-login-lastlog-create.patch
|
Patch0: 2.23-login-lastlog-create.patch
|
||||||
|
|
||||||
### Backport from v2.24 + #972457
|
# v2.24 backport: #972457
|
||||||
Patch1: 2.24-agetty-clocal.patch
|
Patch1: 2.24-agetty-clocal.patch
|
||||||
|
# v2.24 backport: #987787 - Remove lastlogin from su
|
||||||
|
Patch2: 2.24-su-suppress-PAM-info-messages.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The util-linux package contains a large variety of low-level system
|
The util-linux package contains a large variety of low-level system
|
||||||
|
@ -797,6 +799,7 @@ fi
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Sep 9 2013 Karel Zak <kzak@redhat.com> 2.23.2-3
|
* Mon Sep 9 2013 Karel Zak <kzak@redhat.com> 2.23.2-3
|
||||||
- refresh and rename patches
|
- refresh and rename patches
|
||||||
|
- fix #987787 - Remove lastlogin from su
|
||||||
|
|
||||||
* Thu Aug 1 2013 Karel Zak <kzak@redhat.com> 2.23.2-2
|
* Thu Aug 1 2013 Karel Zak <kzak@redhat.com> 2.23.2-2
|
||||||
- fix 990083 - su doesn't work with pam_ecryptfs
|
- fix 990083 - su doesn't work with pam_ecryptfs
|
||||||
|
|
Loading…
Reference in New Issue