Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37861183
en ru br
ALT Linux repositórios
S:3.22-alt11
5.0: 3.22-alt7
4.1: 3.22-alt7
4.0: 3.22-alt7
3.0: 3.22-alt4

Group :: Rede/E-Mail
RPM: procmail

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: procmail-3.22-owl-alt-fixes.patch
Download


diff -ur procmail-3.22~/src/exopen.c procmail-3.22/src/exopen.c
--- procmail-3.22~/src/exopen.c	Tue Sep 11 08:56:58 2001
+++ procmail-3.22/src/exopen.c	Sun Oct 14 00:59:14 2001
@@ -55,9 +55,9 @@
  const size_t len;const mode_t mode;const int verbos,flags;
 { static const char s2c[]=".,+%";static int serial=STRLEN(s2c);
   static time_t t;char*dot,*end,*host;struct stat filebuf;
-  int nicediff,i,didnice,retry=RETRYunique;
+  int i,didnice=0,retry=RETRYunique;
   if(flags&doCHOWN)		  /* semi-critical, try raising the priority */
-   { nicediff=nice(0);SETerrno(0);nicediff-=nice(-NICE_RANGE);
+   { nice(0);SETerrno(0);nice(-NICE_RANGE);
      didnice=!errno;					  /* did we succeed? */
    }
   end=full+len;
@@ -112,8 +112,9 @@
   while((!i||errno!=ENOENT||	      /* casually check if it already exists */
 	 (0>(i=ropen(full,O_WRONLY|O_CREAT|O_EXCL,mode))&&errno==EEXIST))&&
 	(i= -1,retry--));
-  if(flags&doCHOWN&&didnice)
-     nice(nicediff);		   /* put back the priority to the old level */
+  if(didnice) {
+     nice(NICE_RANGE/2);nice(0);   /* put back the priority to the old level */
+  }
   if(i<0)
    { if(verbos)			      /* this error message can be confusing */
 	writeerr(full);					 /* for casual users */
diff -ur procmail-3.22~/src/foldinfo.c procmail-3.22/src/foldinfo.c
--- procmail-3.22~/src/foldinfo.c	Tue Sep 11 08:57:32 2001
+++ procmail-3.22/src/foldinfo.c	Sun Oct 14 01:06:12 2001
@@ -11,6 +11,7 @@
  "$Id: foldinfo.c,v 1.11 2001/08/04 07:07:42 guenther Exp $";
 #endif
 #include "procmail.h"
+#include "acommon.h"
 #include "misc.h"
 #include "lastdirsep.h"
 #include "robust.h"
@@ -99,9 +100,9 @@
 
 static int mkmaildir(buffer,chp,paranoid)char*const buffer,*const chp;
  const int paranoid;
-{ mode_t mode;int i;
+{ mode_t mode;int i=chp-buffer+1;
   if(paranoid)
-     memcpy(buf2,buffer,i=chp-buffer+1),buf2[i-1]= *MCDIRSEP_,buf2[i]='\0';
+     memcpy(buf2,buffer,i),buf2[i-1]= *MCDIRSEP_,buf2[i]='\0';
   return
    (strcpy(chp,maildirnew),mode=trymkdir(buffer,paranoid,i),S_ISDIR(mode))&&
    (strcpy(chp,maildircur),mode=trymkdir(buffer,paranoid,i),S_ISDIR(mode))&&
@@ -111,6 +112,7 @@
 int foldertype(type,forcedir,modep,paranoid)int type,forcedir;
  mode_t*const modep;struct stat*const paranoid;
 { struct stat stbuf;mode_t mode;int i;char*chp;
+  mode=0; /* XXX: this appears to be actually used (type==ft_FILE&&forcedir) */
   if(!type)
      type=folderparse();
   switch(type)
diff -ur procmail-3.22~/src/formail.c procmail-3.22/src/formail.c
--- procmail-3.22~/src/formail.c	Tue Sep 11 08:57:32 2001
+++ procmail-3.22/src/formail.c	Sun Oct 14 01:19:41 2001
@@ -305,7 +305,7 @@
 			     /* lifted out of main() to reduce main()'s size */
 static void elimdups(namep,idcache,maxlen,split)const char*const namep;
  FILE*idcache;const long maxlen;const int split;
-{ int dupid=0;char*key,*oldnewl;
+{ int dupid=0;char*key,*oldnewl=0;
   key=(char*)namep;		  /* not to worry, no change will be noticed */
   if(!areply)
    { key=0;
@@ -364,9 +364,9 @@
 
 int main(lastm,argv)int lastm;const char*const argv[];
 { int i,split=0,force=0,bogus=1,every=0,headreply=0,digest=0,nowait=0,keepb=0,
-   minfields=(char*)progid-(char*)progid,conctenate=0,babyl=0,babylstart,
+   minfields=(char*)progid-(char*)progid,conctenate=0,babyl=0,babylstart=0,
    berkeley=0,forgetclen;
-  long maxlen,ctlength;FILE*idcache=0;pid_t thepid;
+  long maxlen=0,ctlength;FILE*idcache=0;pid_t thepid;
   size_t j,lnl,escaplen;char*chp,*namep,*escap=ESCAP;
   struct field*fldp,*fp2,**afldp,*fdate,*fcntlength,*fsubject,*fFrom_;
   if(lastm)			       /* sanity check, any argument at all? */
@@ -786,7 +786,10 @@
 	   else if(split&&digest&&(lnl||every)&&digheadr())	  /* digest? */
 accuhdr:    { for(i=minfields;--i&&readhead()&&digheadr();); /* found enough */
 	      if(!i)					   /* then split it! */
-splitit:       { if(!lnl)   /* did the previous mail end with an empty line? */
+#ifdef MAILBOX_SEPARATOR
+splitit:
+#endif
+	       { if(!lnl)   /* did the previous mail end with an empty line? */
 		    lputcs('\n');		      /* but now it does :-) */
 		 logfolder();
 		 if(fclose(mystdout)==EOF||errout==EOF)
diff -ur procmail-3.22~/src/misc.c procmail-3.22/src/misc.c
--- procmail-3.22~/src/misc.c	Fri Jun 29 06:21:05 2001
+++ procmail-3.22/src/misc.c	Sun Oct 14 01:20:10 2001
@@ -439,7 +439,7 @@
       if(getlline(buf2,buf2+linebuf))
 	 i=0;				       /* assume failure on overflow */
       if(i)					 /* check out all conditions */
-       { int negate,scoreany;double weight,xponent,lscore;
+       { int negate,scoreany;double weight=0,xponent=0,lscore;
 	 char*lstartchar=startchar;long ltobesent=tobesent,sizecheck=filled;
 	 for(chp=strchr(buf2,'\0');--chp>=buf2;)
 	  { switch(*chp)		  /* strip off whitespace at the end */
diff -ur procmail-3.22~/src/pipes.c procmail-3.22/src/pipes.c
--- procmail-3.22~/src/pipes.c	Tue Sep 11 08:58:44 2001
+++ procmail-3.22/src/pipes.c	Sun Oct 14 01:07:27 2001
@@ -141,7 +141,7 @@
 }
 
 int pipthrough(line,source,len)char*line,*source;const long len;
-{ int pinfd[2],poutfd[2];char*eq;
+{ int pinfd[2],poutfd[2];char*eq=0;
   if(Stdout)
    { *(eq=strchr(Stdout,'\0')-1)='\0';			     /* chop the '=' */
      if(!(backblock=getenv(Stdout)))			/* no current value? */
@@ -188,7 +188,7 @@
   rclose(PWRB);rclose(PWRI);getstdin(PRDI);
   if(forkerr(pidchild,procmailn))
      return -1;
-  if(Stdout)
+  if(eq)
    { char*name;memblk temp;		    /* ick.  This is inefficient XXX */
      *eq='=';name=Stdout;Stdout=0;primeStdout(name);free(name);
      makeblock(&temp,Stdfilled);
@@ -254,7 +254,9 @@
       }
    }
   pidchild=0;
+#if 0
 builtin:
+#endif
   if(!sh)
      concatenate(line);
   if(asgnlastf)
diff -ur procmail-3.22~/src/procmail.c procmail-3.22/src/procmail.c
--- procmail-3.22~/src/procmail.c	Tue Sep 11 08:59:14 2001
+++ procmail-3.22/src/procmail.c	Sun Oct 14 01:08:08 2001
@@ -95,7 +95,7 @@
  mainloop P((void));
 
 int main(argc,argv)int argc;const char*const argv[];
-{ register char*chp,*chp2;
+{ register char*chp=0,*chp2=0;
 #if 0				/* enable this if you want to trace procmail */
   kill(getpid(),SIGSTOP);/*raise(SIGSTOP);*/
 #endif
@@ -591,7 +591,9 @@
 	  (stbuf.st_mode&S_IWOTH)||		      /* writable by others, */
 	  rctype==rct_DEFAULT&&		   /* if the default then also check */
 	   (stbuf.st_mode&S_IWGRP)&&		   /* for writable by group, */
-	   (NO_CHECK_stgid||stbuf.st_gid!=gid)
+	   (NO_CHECK_stgid||stbuf.st_gid!=gid)||
+	   !S_ISREG(stbuf.st_mode)||
+	   (stbuf.st_blksize>=512 && stbuf.st_size>stbuf.st_blocks*stbuf.st_blksize)
 	 )&&strcmp(devnull,buf)||	     /* /dev/null is a special case, */
 	(*chp='\0',stat(buf,&stbuf))||		     /* check the directory, */
 #ifndef CAN_chown				   /* sticky and can't chown */
diff -ur procmail-3.22~/src/regexp.c procmail-3.22/src/regexp.c
--- procmail-3.22~/src/regexp.c	Sun Dec 31 09:08:45 2000
+++ procmail-3.22/src/regexp.c	Sun Oct 14 01:21:51 2001
@@ -125,7 +125,7 @@
 	   errorno=1;
 	return;
      case R_BEG_CLASS:					   /* a simple class */
-      { unsigned i,j=R_NOT_CLASS==*++p;
+      { unsigned i=0,j=R_NOT_CLASS==*++p;
 	if(e)
 	 { r->opc=OPC_CLASS;r->next=Ceps e;Cc(r,pos1.st_)=Cc(r,pos2.st_)=0;
 	   i=maxindex(rAc);
@@ -268,7 +268,7 @@
 }
 
 static int por(e)const struct eps*const e;
-{ uchar*pvold;struct eps*rvold;
+{ uchar*pvold=0;struct eps*rvold=0;
   if(!e)
    { rvold=r;
      if(cachea==(pvold=p))
@@ -509,7 +509,7 @@
    }
   while(--len);					     /* still text to search */
   goto wrapup;
-  ;{ const char*start,*bom;
+  ;{ const char*start,*bom=0;
      do
       { i= *++str;			 /* get the next real-text character */
 	if(i-'A'<='Z'-'A')
diff -ur procmail-3.22~/src/robust.c procmail-3.22/src/robust.c
--- procmail-3.22~/src/robust.c	Fri Jun 29 06:21:11 2001
+++ procmail-3.22/src/robust.c	Sun Oct 14 00:56:18 2001
@@ -22,6 +22,9 @@
 #define nomemretry	noresretry
 #define noforkretry	noresretry
 		       /* set nextexit to prevent elog() from using malloc() */
+#ifdef __GNUC__
+__attribute__ ((noreturn))
+#endif
 void nomemerr(len)const size_t len;
 { static const char outofmem[]="Out of memory";
   nextexit=2;nlog(outofmem);elog("\n");
@@ -132,7 +135,8 @@
 int ropen(name,mode,mask)const char*const name;const int mode;
  const mode_t mask;
 { int i,r;					       /* a SysV secure open */
-  for(r=noresretry,lcking|=lck_FILDES;0>(i=open(name,mode,mask));)
+  for(r=noresretry,lcking|=lck_FILDES;
+   0>(i=open(name,mode|O_NOCTTY|O_NONBLOCK,mask));)
      if(errno!=EINTR&&!(errno==ENFILE&&(r<0||r--)))
 	break;		 /* survives a temporary "file table full" condition */
   lcking&=~lck_FILDES;
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009