rpms/bash/devel bash-3.2-audit.patch, NONE, 1.1 bash.spec, 1.165, 1.166
Roman Rakus
rrakus at fedoraproject.org
Mon Dec 15 10:42:20 UTC 2008
- Previous message (by thread): rpms/nmap/devel .cvsignore, 1.22, 1.23 nmap-4.68-nostrip.patch, 1.1, 1.2 nmap.spec, 1.49, 1.50 sources, 1.22, 1.23 zenmap.desktop, 1.2, 1.3
- Next message (by thread): rpms/nmap/devel zenmap-root.consoleapps, NONE, 1.1 zenmap-root.pamd, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rrakus
Update of /cvs/extras/rpms/bash/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12798
Modified Files:
bash.spec
Added Files:
bash-3.2-audit.patch
Log Message:
Enabling auditing. Resolves: #476216
bash-3.2-audit.patch:
--- NEW FILE bash-3.2-audit.patch ---
--- bash-3.2/lib/readline/readline.c.audit 2008-01-18 13:06:25.000000000 +0100
+++ bash-3.2/lib/readline/readline.c 2008-01-18 13:06:25.000000000 +0100
@@ -55,6 +55,12 @@
extern int errno;
#endif /* !errno */
+#if defined (HAVE_DECL_AUDIT_USER_TTY)
+# include <sys/socket.h>
+# include <linux/audit.h>
+# include <linux/netlink.h>
+#endif
+
/* System-specific feature definitions and include files. */
#include "rldefs.h"
#include "rlmbutil.h"
@@ -292,7 +298,47 @@
rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
return 0;
}
-
+
+#if defined (HAVE_DECL_AUDIT_USER_TTY)
+/* Report STRING to the audit system. */
+static void
+audit_tty (char *string)
+{
+ struct sockaddr_nl addr;
+ struct msghdr msg;
+ struct nlmsghdr nlm;
+ struct iovec iov[2];
+ size_t size;
+ int fd;
+
+ size = strlen (string) + 1;
+ fd = socket (AF_NETLINK, SOCK_RAW, NETLINK_AUDIT);
+ if (fd < 0)
+ return;
+ nlm.nlmsg_len = NLMSG_LENGTH (size);
+ nlm.nlmsg_type = AUDIT_USER_TTY;
+ nlm.nlmsg_flags = NLM_F_REQUEST;
+ nlm.nlmsg_seq = 0;
+ nlm.nlmsg_pid = 0;
+ iov[0].iov_base = &nlm;
+ iov[0].iov_len = sizeof (nlm);
+ iov[1].iov_base = string;
+ iov[1].iov_len = size;
+ addr.nl_family = AF_NETLINK;
+ addr.nl_pid = 0;
+ addr.nl_groups = 0;
+ msg.msg_name = &addr;
+ msg.msg_namelen = sizeof (addr);
+ msg.msg_iov = iov;
+ msg.msg_iovlen = 2;
+ msg.msg_control = NULL;
+ msg.msg_controllen = 0;
+ msg.msg_flags = 0;
+ (void)sendmsg (fd, &msg, 0);
+ close (fd);
+}
+#endif
+
/* Read a line of input. Prompt with PROMPT. An empty PROMPT means
none. A return value of NULL means that EOF was encountered. */
char *
@@ -326,6 +372,11 @@
rl_clear_signals ();
#endif
+#if defined (HAVE_DECL_AUDIT_USER_TTY)
+ if (value != NULL)
+ audit_tty (value);
+#endif
+
return (value);
}
--- bash-3.2/configure.in.audit 2008-01-18 13:06:25.000000000 +0100
+++ bash-3.2/configure.in 2008-01-18 13:06:25.000000000 +0100
@@ -871,6 +871,8 @@
BASH_SYS_PGRP_SYNC
BASH_SYS_SIGNAL_VINTAGE
+AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include <linux/audit.h>]])
+
dnl checking for the presence of certain library symbols
BASH_SYS_ERRLIST
BASH_SYS_SIGLIST
--- bash-3.2/config.h.in.audit 2008-01-18 13:06:25.000000000 +0100
+++ bash-3.2/config.h.in 2008-01-18 13:10:19.000000000 +0100
@@ -1058,6 +1058,14 @@
/* End additions for lib/intl */
+
+/* Additions for lib/readline */
+
+/* Define if you have <linux/audit.h> and it defines AUDIT_USER_TTY */
+#undef HAVE_DECL_AUDIT_USER_TTY
+
+/* End additions for lib/readline */
+
#include "config-bot.h"
#endif /* _CONFIG_H_ */
Index: bash.spec
===================================================================
RCS file: /cvs/extras/rpms/bash/devel/bash.spec,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -r1.165 -r1.166
--- bash.spec 9 Dec 2008 14:54:13 -0000 1.165
+++ bash.spec 15 Dec 2008 10:41:49 -0000 1.166
@@ -1,7 +1,7 @@
Version: 3.2
Name: bash
Summary: The GNU Bourne Again shell (bash) version %{version}
-Release: 31%{?dist}
+Release: 32%{?dist}
Group: System Environment/Shells
License: GPLv2+
Url: http://www.gnu.org/software/bash
@@ -87,6 +87,7 @@
Patch142: bash-3.2-execve_catch_signals.patch
Patch143: bash-3.2-ssh_source_bash.patch
Patch144: bash-3.2-command_not_found.patch
+Patch145: bash-3.2-audit.patch
Requires(post): ncurses-libs
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -184,6 +185,7 @@
%patch142 -p1 -b .execve_catch_signals
%patch143 -p1 -b .ssh_source_bash
%patch144 -p1 -b .command_not_found
+%patch145 -p1 -b .audit
echo %{version} > _distribution
echo %{release} > _patchlevel
@@ -325,6 +327,10 @@
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
%changelog
+* Mon Dec 15 2008 Roman Rakus <rrakus at redhat.com> - 3.2-32
+- Enabling auditing
+ Resolves: #476216
+
* Tue Dec 09 2008 Roman Rakus <rrakus at redhat.com> - 3.2-31
- Patchlevel 48
- Previous message (by thread): rpms/nmap/devel .cvsignore, 1.22, 1.23 nmap-4.68-nostrip.patch, 1.1, 1.2 nmap.spec, 1.49, 1.50 sources, 1.22, 1.23 zenmap.desktop, 1.2, 1.3
- Next message (by thread): rpms/nmap/devel zenmap-root.consoleapps, NONE, 1.1 zenmap-root.pamd, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list