Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: suid policy: msg#00001

Subject: Re: suid policy
lars wrote:
Hi,
I want to package a perl web-interface that needs root permissions for some
operations. As the perl-suid package is marked as deprecated, I am not sure,
how to do this in the good debian way ...
Maybe you could give me some hints.

As I recall, the whole idea of perl-suid was abandoned upstream. It was found that it's not possible to do it securely.

The perl-cgi should be able to execute the following actions:
- use cryptsetup for partitions
- mount/umount _arbitrary_ mapped devices
- partition harddisks

For now I see the following options:
- write a short binary wrapper with suid permissions
- move all routines, that need root permission to a seperate script and add an
entry to /etc/sudoers for it

It does not seem to be sufficient, to just set the right permissions on selected
block devices, as only root may mount something without an entry to fstab.

Do you have any suggestions?

You could also add entries to sudoers for all the commands the script needs to run. Then in your CGI script, instead of just running the external program directly (mount, cfdisk, whatever), you'd call sudo to run it. I think this would probably be the most secure method. If you were to make another script and run *it* through sudo, then you have to be *darn sure* that script is solid. But by running each command through sudo, you can define exactly what options and what devices are allowed--if you can narrow it down.

Allowing a web script to partition your hard disks sounds pretty scary... But these days it seems there's a web script for everything! :-)

ttyl

--

C. Chad Wallace, B.Sc.
The Lodging Company
http://skihills.com/
OpenPGP Public Key ID: 0x262208A0




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
user-groups.jax...    php.zend.framew...    os.solaris.open...    web.quixote.use...    java.openjdk.ho...    ietf.secmech/20...    gnu.glpk/2004-0...    recreation.cars...    network.smokepi...    linux.drivers.i...    cms.opencms.dev...    fonts.gfontview...    text.xml.soap.u...    voip.nist-sip/2...    debian.ports.hp...    xfree86.interna...    science.biology...    qnx.openqnx.dev...    mail.sylpheed.c...    busybox/bios/20...    emulators.kvm.s...    hardware.openco...    apple.fink.begi...    kde.german/2006...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation