Accepting request 202455 from home:elvigia:branches:Base:System
- at-secure_getenv.patch at must use secure_getenv. OBS-URL: https://build.opensuse.org/request/show/202455 OBS-URL: https://build.opensuse.org/package/show/Base:System/at?expand=0&rev=68
This commit is contained in:
parent
aed852987d
commit
4b08ab7525
48
at-secure_getenv.patch
Normal file
48
at-secure_getenv.patch
Normal file
@ -0,0 +1,48 @@
|
||||
--- at-3.1.13.orig/configure.ac
|
||||
+++ at-3.1.13/configure.ac
|
||||
@@ -17,8 +17,9 @@ AC_SUBST(VERSION)
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
dnl Checks for programs.
|
||||
-
|
||||
-AC_PROG_CC
|
||||
+AC_USE_SYSTEM_EXTENSIONS
|
||||
+AC_PROG_CC_STDC
|
||||
+AC_SYS_LARGEFILE
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_YACC
|
||||
@@ -58,6 +59,7 @@ AC_CHECK_LIB(fl,yywrap,
|
||||
|
||||
PKG_CHECK_MODULES([HX], [libHX])
|
||||
|
||||
+AC_CHECK_FUNCS([__secure_getenv secure_getenv])
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
--- at-3.1.13.orig/at.c
|
||||
+++ at-3.1.13/at.c
|
||||
@@ -97,6 +97,14 @@
|
||||
#define DEFAULT_QUEUE 'a'
|
||||
#define BATCH_QUEUE 'b'
|
||||
|
||||
+#ifndef HAVE_SECURE_GETENV
|
||||
+# ifdef HAVE___SECURE_GETENV
|
||||
+# define secure_getenv __secure_getenv
|
||||
+# else
|
||||
+# error neither secure_getenv nor __secure_getenv is available
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
enum {
|
||||
ATQ, BATCH, ATRM, AT, CAT
|
||||
}; /* what program we want to run */
|
||||
@@ -359,7 +367,7 @@ writefile(time_t runtimer, char queue)
|
||||
*/
|
||||
mailname = getlogin();
|
||||
if (mailname == NULL)
|
||||
- mailname = getenv("LOGNAME");
|
||||
+ mailname = secure_getenv("LOGNAME");
|
||||
if (mailname == NULL || mailname[0] == '\0' || getpwnam(mailname) == NULL) {
|
||||
pass_entry = getpwuid(real_uid);
|
||||
if (pass_entry != NULL)
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 6 23:02:00 UTC 2013 - crrodriguez@opensuse.org
|
||||
|
||||
- at-secure_getenv.patch at must use secure_getenv.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 15 13:50:37 UTC 2013 - werner@suse.de
|
||||
|
||||
|
2
at.spec
2
at.spec
@ -61,6 +61,7 @@ Patch20: at-parse-suse-sysconfig.patch
|
||||
Patch21: at-makefile-deps.patch
|
||||
#PATCH-FIX-OPENSUSE Set pid dir to /run not /var/run
|
||||
Patch22: at-piddir.patch
|
||||
Patch23: at-secure_getenv.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
PreReq: %{_sbindir}/useradd %{_sbindir}/groupadd %fillup_prereq %insserv_prereq
|
||||
PreReq: permissions
|
||||
@ -96,6 +97,7 @@ This program allows you to run jobs at specified times.
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
%patch22
|
||||
%patch23 -p1
|
||||
%build
|
||||
rm -fv y.tab.c y.tab.h lex.yy.c lex.yy.o y.tab.o
|
||||
autoreconf -fiv
|
||||
|
Loading…
x
Reference in New Issue
Block a user