Hey,
I was just merging 0.41 vanilla into pd-extended 0.40 and noticed something worthwhile to point out. It seems there isn't a patch submitted for this, but it is quite simple. Basically, in s_inter.c, 'seteuid()' is used to lose setuid privileges. As far as I understand it, seteuid() allows the program to keep the root privilege and switch back and forth between root and non-root.
In Pd, it seems it should use setuid() which means change to the new UID and lose the old one completely. Once it starts, it shouldn't need to switch back, right? Pd-extended 0.40.3 has this change in it and it seems to work fine.
.hc
----------------------------------------------------------------------------
Computer science is no more related to the computer than astronomy is related to the telescope. -Edsger Dykstra
I was just merging 0.41 vanilla into pd-extended 0.40 and noticed something worthwhile to point out. It seems there isn't a patch submitted for this, but it is quite simple. Basically, in s_inter.c, 'seteuid()' is used to lose setuid privileges. As far as I understand it, seteuid() allows the program to keep the root privilege and switch back and forth between root and non-root.
hm, why does pd need root privileges, anyway? shouldn't the resource limiting be handled by pam these days?
tim
Hallo, Tim Blechmann hat gesagt: // Tim Blechmann wrote:
I was just merging 0.41 vanilla into pd-extended 0.40 and noticed something worthwhile to point out. It seems there isn't a patch submitted for this, but it is quite simple. Basically, in s_inter.c, 'seteuid()' is used to lose setuid privileges. As far as I understand it, seteuid() allows the program to keep the root privilege and switch back and forth between root and non-root.
hm, why does pd need root privileges, anyway? shouldn't the resource limiting be handled by pam these days?
Agreed. IMO it's unnecessary: None of my Pd Linux installs has Pd installed setuid, still the "-rt" switch works fine for every user in group "audio" and I never run Pd as root.
Ciao
On Jan 12, 2009, at 5:04 AM, Frank Barknecht wrote:
Hallo, Tim Blechmann hat gesagt: // Tim Blechmann wrote:
I was just merging 0.41 vanilla into pd-extended 0.40 and noticed something worthwhile to point out. It seems there isn't a patch submitted for this, but it is quite simple. Basically, in s_inter.c, 'seteuid()' is used to lose setuid privileges. As far as I understand it, seteuid() allows the program to keep the root privilege and switch back and forth between root and non-root.
hm, why does pd need root privileges, anyway? shouldn't the resource limiting be handled by pam these days?
Agreed. IMO it's unnecessary: None of my Pd Linux installs has Pd installed setuid, still the "-rt" switch works fine for every user in group "audio" and I never run Pd as root.
In any case, it would be good to make the change to setuid() to help avoid any unwanted visitors coming in via Pd. Someone might set the setuid bit themselves...
.hc
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
----------------------------------------------------------------------------
News is what people want to keep hidden and everything else is publicity. - Bill Moyers
Wow, I fixed this bug in 0.40 but somehow failed to propagate the fix to 0.41 and the new 0.42. I'll go on and put out bug-fixed 0.41 and 0.42 versions.
I think the UID stuff is still needed to remain compatible with older versions of linux. I've never actually set a policy as to how far back to remain compatible, but in practice I believe Pd is compatible back to W2K, MacOS 10.4, and redhat 8.0.
Occasionally I hear from someone running Pd on BSD.
cheers Miller
On Mon, Jan 12, 2009 at 12:38:15PM -0500, Hans-Christoph Steiner wrote:
On Jan 12, 2009, at 5:04 AM, Frank Barknecht wrote:
Hallo, Tim Blechmann hat gesagt: // Tim Blechmann wrote:
I was just merging 0.41 vanilla into pd-extended 0.40 and noticed something worthwhile to point out. It seems there isn't a patch submitted for this, but it is quite simple. Basically, in s_inter.c, 'seteuid()' is used to lose setuid privileges. As far as I understand it, seteuid() allows the program to keep the root privilege and switch back and forth between root and non-root.
hm, why does pd need root privileges, anyway? shouldn't the resource limiting be handled by pam these days?
Agreed. IMO it's unnecessary: None of my Pd Linux installs has Pd installed setuid, still the "-rt" switch works fine for every user in group "audio" and I never run Pd as root.
In any case, it would be good to make the change to setuid() to help avoid any unwanted visitors coming in via Pd. Someone might set the setuid bit themselves...
.hc
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
News is what people want to keep hidden and everything else is publicity. - Bill Moyers
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Miller Puckette wrote:
Wow, I fixed this bug in 0.40 but somehow failed to propagate the fix to 0.41 and the new 0.42. I'll go on and put out bug-fixed 0.41 and 0.42 versions.
are you going to fix the crasher bug in "find" (which i posted yesterday) as well?
fgmsadr IOhannes