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

[debian-devel:13629] Re: dpkg-statoverride



佐野@浜松です。

In <20010207081351X.kohda@xxxxxxxxxxxxxxxxxxxx>,
  on "Wed, 7 Feb 2001 08:12:39 +0900',
   with "[debian-devel:13625] Re: dpkg-statoverride",
 Atsuhito Kohda <kohda@xxxxxxxxxxxxxxxxxxxx> さん wrote:

> > で、ちょっと読んだだけですが、これ postinst で使うんじゃないかな ?
> 
> やっぱりそうなのかな。unstable なマシンの /var/lib/dpkg/info/
> で grep dpkg-statoverride したのでは該当無しでした。

なんか JP diary 読んだら

NEW 今日のdebian-mentors
SUB Re: dh_suidregister -> ?
! <20010206002653.A19053@xxxxxxxxxxxxx>
CITE
PRE
 > > Packages should almost never call dpkg_statoverride themselves.
 >
 > Earlier, that meant that the setuid/setgid bits got cleared
 > automatically by some daemon, is that not true anymore? Also, since the
 > setgid/setuid bit isn't in the actual package in my case (it can't be -
 > the group isn't created until after the package is decompressed), I
 > *need* to set the permissions on the file each time.
/PRE
 Excerpt from the man page of dpkg-statoverride:
UL
LI This can be used to force programs that are normally setuid to be
LI install without a setuid flag, or only executable by a certain group.
/UL
 In other words,
STRONG dpkg
 will override the package's requested owner and
 mode info with whatever the user has required. No daemon is required.
 I'm not sure if dpkg applies statoverrides at unpack time or after
 scripts have run. If it's the former, you have a problem. If it's the
 latter, you don't. I'd ask the dpkg people.
/CITE

とか書いてあったり。

パッケージが展開される前に存在しているはずのユーザーやグループに
suid/sgid する場合なら、単にパッケージを作成する前に rules で chmod 
しておくだけでいいということみたい。

でも、元々 suidregister を使っていたパッケージだと、しばらくは
過渡措置として dpkg-statoverride --import しておいたほうが良いんじゃ
ないのかな。そのへんも dpkg が自動で面倒みてくれるんだろうか ?

あと、この diary で紹介されている例というのは、どうやらパッケージが
インストールされて初めて作成されるグループ (そんなのあるのか ?) に
 sgid したい場合には、パッケージの中に sgid 設定した状態でファイルを
格納しておくことは不可能だということらしいですね。

-- 
     # (わたしのおうちは浜松市、「夜のお菓子」で有名さ。)
    <kgh12351@xxxxxxxxxxx> : Taketoshi Sano (佐野 武俊)