rpms/at/F-7 at-3.1.10-perm.patch, 1.2, 1.3 at-3.1.8-t_option.patch, 1.5, 1.6 at.spec, 1.56, 1.57

Marcela Mašláňová (mmaslano) fedora-extras-commits at redhat.com
Wed Jul 4 09:18:42 UTC 2007


Author: mmaslano

Update of /cvs/pkgs/rpms/at/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15893

Modified Files:
	at-3.1.10-perm.patch at-3.1.8-t_option.patch at.spec 
Log Message:
Change patches.


at-3.1.10-perm.patch:

Index: at-3.1.10-perm.patch
===================================================================
RCS file: /cvs/pkgs/rpms/at/F-7/at-3.1.10-perm.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- at-3.1.10-perm.patch	3 Jul 2007 14:05:53 -0000	1.2
+++ at-3.1.10-perm.patch	4 Jul 2007 09:18:27 -0000	1.3
@@ -1,12 +1,11 @@
---- at-3.1.10/at.c.perm	2007-07-02 15:40:35.000000000 +0200
-+++ at-3.1.10/at.c	2007-07-02 16:19:54.000000000 +0200
-@@ -314,10 +314,11 @@
+--- at-3.1.10/at.c.perm	2007-07-04 09:43:19.000000000 +0200
++++ at-3.1.10/at.c	2007-07-04 10:04:47.000000000 +0200
+@@ -314,26 +314,19 @@
  	 * bit.  Yes, this is a kluge.
  	 */
  	cmask = umask(S_IRUSR | S_IWUSR | S_IXUSR);
 -        seteuid(real_uid);
-+        //seteuid(real_uid);
-+	seteuid(effective_uid);
++        seteuid(effective_uid);
  	if ((fd = open(atfile, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, S_IRUSR)) == -1)
  	    perr("Cannot create atjob file %.500s", atfile);
 -        seteuid(effective_uid);
@@ -14,3 +13,66 @@
  
  	if ((fd2 = dup(fd)) < 0)
  	    perr("Error in dup() of job file");
+ 
+-        /*
+ 	if (fchown(fd2, real_uid, real_gid) != 0)
+-	    perr("Cannot give away file");
+-        */
++	    perr("Cannot give real_uid and real_gid the file");
+ 
+     PRIV_END
+ 
+-    /* We no longer need suid root; now we just need to be able to write
+-     * to the directory, if necessary.
+-     */
+-
+-    REDUCE_PRIV(daemon_uid, daemon_gid)
+     /* We've successfully created the file; let's set the flag so it 
+      * gets removed in case of an interrupt or error.
+      */
+@@ -491,7 +484,7 @@
+      */
+ 
+     if (fchmod(fd2, S_IRUSR | S_IWUSR | S_IXUSR) < 0)
+-	perr("Cannot give away file");
++	perr("Cannot change the mode of the file");
+ 
+     close(fd2);
+ 
+@@ -656,7 +649,7 @@
+                     We need the unprivileged uid here since the file is owned by the real
+                     (not effective) uid.
+                     */
+-                    setregid(real_gid, effective_gid);
++		    PRIV_START
+ 
+ 		    if (queue == '=') {
+ 			fprintf(stderr, "Warning: deleting running job\n");
+@@ -665,8 +658,8 @@
+ 			perr("Cannot unlink %.500s", dirent->d_name);
+ 			rc = EXIT_FAILURE;
+ 		    }
++		    PRIV_END
+ 
+-                    setregid(effective_gid, real_gid);
+ 		    done = 1;
+ 
+ 		    break;
+@@ -676,7 +669,7 @@
+ 			FILE *fp;
+ 			int ch;
+ 
+-			setregid(real_gid, effective_gid);
++			PRIV_START
+ 			fp = fopen(dirent->d_name, "r");
+ 
+ 			if (fp) {
+@@ -689,7 +682,7 @@
+ 			    perr("Cannot open %.500s", dirent->d_name);
+ 			    rc = EXIT_FAILURE;
+ 			}
+-			setregid(effective_gid, real_gid);
++			PRIV_END
+ 		    }
+ 		    break;
+ 

at-3.1.8-t_option.patch:

Index: at-3.1.8-t_option.patch
===================================================================
RCS file: /cvs/pkgs/rpms/at/F-7/at-3.1.8-t_option.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- at-3.1.8-t_option.patch	3 Jul 2007 14:05:53 -0000	1.5
+++ at-3.1.8-t_option.patch	4 Jul 2007 09:18:27 -0000	1.6
@@ -1,5 +1,5 @@
---- at-3.1.10/at.c.t_option	2007-06-28 14:43:51.000000000 +0200
-+++ at-3.1.10/at.c	2007-06-28 14:54:04.000000000 +0200
+--- at-3.1.10/at.c.t_option	2007-07-04 11:12:10.000000000 +0200
++++ at-3.1.10/at.c	2007-07-04 11:13:19.000000000 +0200
 @@ -396,8 +396,9 @@
  	    unsigned int i;
  	    for (i = 0; i < sizeof(no_export) / sizeof(no_export[0]); i++) {
@@ -138,7 +138,24 @@
  	default:
  	    usage();
  	    break;
-@@ -955,10 +1054,12 @@
+@@ -923,10 +1022,12 @@
+ 	break;
+ 
+     case AT:
+-	if (argc > optind) {
+-	    timer = parsetime(argc - optind, argv + optind);
+-	} else {
+-	    timer = 0;
++	if (timer == 0) {
++	      if (argc > optind) {
++	          timer = parsetime(argc - optind, argv + optind);
++	       } else {
++	          timer = 0;
++               }
+ 	}
+ 
+ 	if (timer == 0) {
+@@ -955,10 +1056,12 @@
  	else
  	    queue = DEFAULT_BATCH_QUEUE;
  
@@ -155,8 +172,8 @@
  
  	if (atverify) {
  	    struct tm *tm = localtime(&timer);
---- at-3.1.10/at.1.in.t_option	2007-06-28 14:43:51.000000000 +0200
-+++ at-3.1.10/at.1.in	2007-06-28 14:43:51.000000000 +0200
+--- at-3.1.10/at.1.in.t_option	2007-07-04 11:12:10.000000000 +0200
++++ at-3.1.10/at.1.in	2007-07-04 11:12:10.000000000 +0200
 @@ -12,6 +12,16 @@
  .RB [ -mldbv ]
  .B TIME


Index: at.spec
===================================================================
RCS file: /cvs/pkgs/rpms/at/F-7/at.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- at.spec	3 Jul 2007 14:09:17 -0000	1.56
+++ at.spec	4 Jul 2007 09:18:27 -0000	1.57
@@ -6,7 +6,7 @@
 Summary: Job spooling tools
 Name: at
 Version: 3.1.10
-Release: 12%{?dist}
+Release: 13%{?dist}
 License: GPL
 Group: System Environment/Daemons
 URL: http://ftp.debian.org/debian/pool/main/a/at
@@ -18,13 +18,12 @@
 Patch2: at-3.1.10-man-timespec-path.patch
 Patch3: at-3.1.7-sigchld.patch
 Patch4: at-3.1.10-typo.patch
-Patch7: at-3.1.8-perr.patch
-#Patch8: at-3.1.8-instinet.patch
-Patch9: at-3.1.10-shell.patch
-Patch11: at-3.1.8-t_option.patch
-Patch14: at-3.1.10-pam.patch
-Patch15: at-3.1.10-dont_fork.patch
-Patch21: at-3.1.10-perm.patch
+Patch5: at-3.1.8-perr.patch
+Patch6: at-3.1.10-shell.patch
+Patch7: at-3.1.8-t_option.patch
+Patch8: at-3.1.10-pam.patch
+Patch9: at-3.1.10-dont_fork.patch
+Patch10: at-3.1.10-perm.patch
 
 BuildRequires: fileutils chkconfig /etc/init.d
 BuildRequires: flex bison autoconf
@@ -63,13 +62,12 @@
 %patch2 -p1 -b .paths
 %patch3 -p1 -b .sigchld
 %patch4 -p1 -b .typo
-%patch7 -p1 -b .perr
-#%patch8 -p1 -b .instinet #unlink unsucessful jobs, removed -> atd crash
-%patch9 -p1 -b .shell
-%patch11 -p1 -b .t_option
-%patch14 -p1 -b .pam
-%patch15 -p1 -b .dont_fork
-%patch21 -p1 -b .perm
+%patch5 -p1 -b .perr
+%patch6 -p1 -b .shell
+%patch7 -p1 -b .t_option
+%patch8 -p1 -b .pam
+%patch9 -p1 -b .dont_fork
+%patch10 -p1 -b .perm
 
 %build
 # patch10 touches configure.in
@@ -167,6 +165,9 @@
 %attr(4755,root,root)	%{_bindir}/at
 
 %changelog
+* Tue Jul  3 2007 Marcela Maslanova <mmaslano at redhat.com> - 3.1.10-13
+- Resolves: rhbz#243064
+
 * Tue Jul  3 2007 Marcela Maslanova <mmaslano at redhat.com> - 3.1.10-12
 - crashing atd
 - work only for root, still broken some functions




More information about the scm-commits mailing list