From 4b08ab7525e704c1de51cb3913e2bb081a0161efd723c8b1e33208b01d87c49c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 7 Oct 2013 13:11:28 +0000 Subject: [PATCH] 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 --- at-secure_getenv.patch | 48 ++++++++++++++++++++++++++++++++++++++++++ at.changes | 5 +++++ at.spec | 2 ++ 3 files changed, 55 insertions(+) create mode 100644 at-secure_getenv.patch diff --git a/at-secure_getenv.patch b/at-secure_getenv.patch new file mode 100644 index 0000000..29a8b5d --- /dev/null +++ b/at-secure_getenv.patch @@ -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) diff --git a/at.changes b/at.changes index 180b24c..0dbe30b 100644 --- a/at.changes +++ b/at.changes @@ -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 diff --git a/at.spec b/at.spec index d035c86..4ab8ec2 100644 --- a/at.spec +++ b/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