[Erp5-report] r44922 luke - /erp5/trunk/patches/dcron-4.4.noroot.no.globals.patch

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 31 17:15:36 CEST 2011


Author: luke
Date: Thu Mar 31 17:15:35 2011
New Revision: 44922

URL: http://svn.erp5.org?rev=44922&view=rev
Log:
 - update patch and do not never change user

Modified:
    erp5/trunk/patches/dcron-4.4.noroot.no.globals.patch

Modified: erp5/trunk/patches/dcron-4.4.noroot.no.globals.patch
URL: http://svn.erp5.org/erp5/trunk/patches/dcron-4.4.noroot.no.globals.patch?rev=44922&r1=44921&r2=44922&view=diff
==============================================================================
--- erp5/trunk/patches/dcron-4.4.noroot.no.globals.patch [utf8] (original)
+++ erp5/trunk/patches/dcron-4.4.noroot.no.globals.patch [utf8] Thu Mar 31 17:15:35 2011
@@ -1,5 +1,3 @@
-# Patch to have dcron running as ordinary user and installable without root
-# requirement
 diff -ru dcron-4.4.org/chuser.c dcron-4.4/chuser.c
 --- dcron-4.4.org/chuser.c	2010-01-18 16:27:31.000000000 +0100
 +++ dcron-4.4/chuser.c	2011-03-31 16:39:52.000000000 +0200
@@ -52,6 +50,61 @@ diff -ru dcron-4.4.org/chuser.c dcron-4.
 +  return getpwnam(user);
  }
  
+diff -ru dcron-4.4.org/crontab.c dcron-4.4/crontab.c
+--- dcron-4.4.org/crontab.c	2010-01-18 16:27:31.000000000 +0100
++++ dcron-4.4/crontab.c	2011-03-31 17:14:12.000000000 +0200
+@@ -316,9 +316,6 @@
+ 
+ 	close(filedes[0]);
+ 
+-	if (ChangeUser(user, NULL) < 0)
+-		exit(0);
+-
+ 	fd = open(file, O_RDONLY);
+ 	if (fd < 0) {
+ 		printlogf(0, "unable to open %s: %s", file, strerror(errno));
+@@ -344,8 +341,6 @@
+ 		const char *ptr;
+ 		char visual[SMALL_BUFFER];
+ 
+-		if (ChangeUser(user, TMPDIR) < 0)
+-			exit(0);
+ 		if ((ptr = getenv("EDITOR")) == NULL || strlen(ptr) >= sizeof(visual))
+ 			if ((ptr = getenv("VISUAL")) == NULL || strlen(ptr) >= sizeof(visual))
+ 				ptr = PATH_VI;
+diff -ru dcron-4.4.org/job.c dcron-4.4/job.c
+--- dcron-4.4.org/job.c	2010-01-18 16:27:31.000000000 +0100
++++ dcron-4.4/job.c	2011-03-31 17:14:23.000000000 +0200
+@@ -62,14 +62,6 @@
+ 		 * Change running state to the user in question
+ 		 */
+ 
+-		if (ChangeUser(file->cf_UserName, TempDir) < 0) {
+-			printlogf(LOG_ERR, "unable to ChangeUser (user %s %s)\n",
+-					file->cf_UserName,
+-					line->cl_Description
+-					);
+-			exit(0);
+-		}
+-
+ 		/* from this point we are unpriviledged */
+ 
+ 		if (DebugOpt)
+@@ -295,14 +287,6 @@
+ 		 * by the mailing and we already verified the mail file.
+ 		 */
+ 
+-		if (ChangeUser(file->cf_UserName, TempDir) < 0) {
+-			printlogf(LOG_ERR, "unable to ChangeUser to send mail (user %s %s)\n",
+-					file->cf_UserName,
+-					line->cl_Description
+-					);
+-			exit(0);
+-		}
+-
+ 		/* from this point we are unpriviledged */
+ 
+ 		/*
 diff -ru dcron-4.4.org/Makefile dcron-4.4/Makefile
 --- dcron-4.4.org/Makefile	2010-01-18 16:27:31.000000000 +0100
 +++ dcron-4.4/Makefile	2011-03-31 16:01:08.000000000 +0200



More information about the Erp5-report mailing list