[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: transition from suidmanager to dpkg-statoverride



Joey Hess:

> There is one wrinkle: If your package previously used suidmanager, and
> you convert it to not, you should make it Conflicts: suidmanager (<< 0.50).
> (The details of why are a little messy; see earlier discussion on
> debian-devel.)

A program I packaged (jwhois, I am taking over maintainership of it
officially with its new version as well) uses suidmanager, but since it
creates a group on installation, it cannot have the setgid bit in the
package; can I still do my chmod'ing in postinst, and just remove the
calls I have to suidmanager.

This is what I do now in postinst, after creating the group (jwhois):

===[ cut ]===
if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ];
then
  suidregister -s jwhois /usr/bin/jwhois root jwhois 02755
  suidregister -s jwhois /var/cache/jwhois root jwhois 0775
elif [ -e /usr/bin/jwhois ]; then
  if chown root.jwhois /usr/bin/jwhois; then
    chmod 02755 /usr/bin/jwhois
    if chown root.jwhois /var/cache/jwhois; then
      chmod 0775 /var/cache/jwhois
    else
      echo "Failed setting ownership on cache directory - cache functions will not work."
    fi
  else
    echo "Failed setting ownership to group \`jwhois' - cache functions will not work."
  fi
fi
===[ cut ]===

And I also chgrp the cache file itself, if it exists.

-- 
\\//
peter - http://www.softwolves.pp.se/

  Statement concerning unsolicited e-mail according to Swedish law:
  http://www.softwolves.pp.se/peter/reklampost.html



Reply to: