Skip Menu |

This queue is for tickets about the PPerl CPAN distribution.

Report information
The Basics
Id: 5485
Status: new
Priority: 0/
Queue: PPerl

People
Owner: Nobody in particular
Requestors: sf [...] flacks.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: add UID to socketname
Hello, I've attached a small patch to add the user's effective UID to the socket name used by PPerl. This will make it create a new socket for each user. I added this because I wanted to be run my spamassasin script for several users. However with --anyuser on, $> and $< are always set to the first user who spawned the process. Without --anyuser, only one person can run the script. I hope you find this useful. Thanks for PPerl, --simonflk
--- main.c.orig Sun Nov 17 21:04:05 2002 +++ main.c Sat Feb 28 20:27:35 2004 @@ -225,4 +225,7 @@ int i = 0; + char euid[12]; + sprintf(euid, "_%d", geteuid()); + if (realpath(scriptname, fullpath) == NULL) { perror("pperl: resolving full pathname to script failed"); @@ -231,5 +234,5 @@ Dx(Debug("realpath returned: %s\n", fullpath)); /* Ugh. I am a terrible C programmer! */ - sockname = my_malloc(strlen(P_tmpdir) + strlen(fullpath) + 3); + sockname = my_malloc(strlen(P_tmpdir) + strlen(fullpath) + 3 + strlen(euid)); save = sockname; sprintf(sockname, "%s/", P_tmpdir); @@ -247,5 +250,5 @@ sockname++; i++; } - *sockname = '\0'; + strcat(sockname, euid); free(fullpath); return save;
From: cubic [...] acronis.com
Patch works for me fine. And I hope this patch or another that allow start same app by different users would be applied into recent upcoming releases. [guest - Sat Feb 28 15:39:26 2004]: Show quoted text
> Hello, > > I've attached a small patch to add the user's effective UID to the > socket name used by PPerl. This will make it create a new socket > for each user. I added this because I wanted to be run my > spamassasin script for several users. However with --anyuser on, $> > and $< are always set to the first user who spawned the process. > Without --anyuser, only one person can run the script. > > I hope you find this useful. > Thanks for PPerl, > --simonflk