WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: xscreensaver : does xscreensaver need to be setuid?  (Read 3609 times)

Offline splodge

  • Newbie
  • *
  • Posts: 2
xscreensaver : does xscreensaver need to be setuid?
« on: July 18, 2011, 01:08:55 PM »
Hi.

First time post, please be gentle.

I've installed tinylinux and am mightily impressed, however after searching for about 2 hours can't seem to find how to get xscreensaver to lock the screen when the screen saver kicks in.

Installed to HD of very ancient laptop (no USB boot, no CD ROM drive boot, no floppy drive boot) 1GHz Pentium 3. 30GB HDD.

Have chrome browser, and xscreensaver installed and that's about it.

After some digging I found I need to set the suid for xscreensaver to 4777, but can't as the filesystem is readonly, Ho hum.

I've setup and managed to have saved the username and password of both tc and root, so you're always prompted for a password to login, though I'm not sure if I'm using shadow passwords or not.

Any ideas anyone ?

Thanks.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14788
Re: xscreensaver : does xscreensaver need to be setuid?
« Reply #1 on: July 18, 2011, 01:58:34 PM »
After some digging I found I need to set the suid for xscreensaver to 4777, but can't as the filesystem is readonly, Ho hum.

You can copy /tmp/tcloop/xscreensaver-base/usr/local/bin/xscreensaver to /usr/local/bin and then you'll be able to edit it.

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: xscreensaver : does xscreensaver need to be setuid?
« Reply #2 on: July 18, 2011, 03:15:47 PM »
After some digging I found I need to set the suid for xscreensaver to 4777, but can't as the filesystem is readonly, Ho hum.
Settings to 4777 is dangerous, as it is a security hole. You'll want 4755 here.

It would be wise to also post this as a bugreport in Tiny Core Extensions, so the .tcz gets fixed as well.

Offline splodge

  • Newbie
  • *
  • Posts: 2
Re: xscreensaver : does xscreensaver need to be setuid?
« Reply #3 on: July 20, 2011, 08:32:39 AM »
Thanks to you both for the replies.

Copying over the files and setting the permissions to 4755 worked a treat.

However, the problem I now have is making /usr/local/bin persistent as it gets blown away every reboot.

I've read the documentation on persistence, but that seems to talk about persistence of .tcz extensions on the filesystem, rather than the uncompressed versions. I understand this ties in with the model of a fresh OS each boot, but is there any way to make the bin files persistent like the users data in /opt ?

I've tried adding an entry into bootsync and bootlocal to do the process each time on startup, and the file copy part works, yet the system does not have root access at this point so can't set the permissions or restart the xscreensaver deamon,

Any ideas ?

Thanks.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14788
Re: xscreensaver : does xscreensaver need to be setuid?
« Reply #4 on: July 20, 2011, 08:44:25 AM »
Quote
Any ideas ?

1. Send the extension maintainer a pm requesting that he/she applies your fix.
2. Modify your local copy of the extension and set it "onboot"

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: xscreensaver : does xscreensaver need to be setuid?
« Reply #5 on: July 20, 2011, 11:40:31 AM »
Hi splodge
Quote
I've tried adding an entry into bootsync and bootlocal to do the process each time on startup, and the file copy part works, yet the system does not have root access at this point so can't set the permissions or restart the xscreensaver deamon,
Unless you REALLY want to run a command twice you should not include it in both of the start up scripts.

If you do not feel up to modifying the extension, you can add the affected files to  /opt/.filetool.lst.
Do not back up the entire  /usr/local/bin  directory.