Bug in %preun:

[root@bgmilne i586]# chkconfig --list smb
smb             0:off   1:off   2:off   3:on    4:off   5:on    6:off
[root@bgmilne i586]# rpm -Uvh *-2.2.3-2mdk.i586.rpm 
(didn't bring RPMs for 2.2.3a-1mdk home :-(, but the only change from 2.2.3-2mdk to
2.2.3a-1mdk was the version number)
[root@bgmilne downloads]# chkconfig --list smb
smb             0:off   1:off   2:off   3:off   4:off   5:off   6:off


>From the spec:
=====================================
%preun

/sbin/chkconfig --level 35 smb reset

if [ $1 = 0 ] ; then
=====================================

The chkconfig should be inside the %if.

See attached proposed patch to the spec (if phpgroupware doesn't mess it up). Also 
puts suid back on smbumount (so we don't end up with millions of smbmounts mounted
and crash a windows box ;-)). Beware, I haven't tested this, othewise I would have
to wait for samba to finish compiling before I go to bed ..

Comments?

Buchan

[EMAIL PROTECTED], [EMAIL PROTECTED] wrote:
>
>On 8 Feb 2002, Bryan Paxton wrote:
>{ On Fri, 2002-02-08 at 17:09, Denis Pelletier wrote:
>{ > Hi,
>{ >=20
>{ > I want samba to start on boot. So to do this I use drakxservices and I=
>=20
>{ > choose the option "run on boot". Everything is ok. But everytime I upgr=
>ade=20
>{ > samba the option "run on boot" is turned off.
>{=20
>{ This is most likely due to your secure level....
>{ If the secure level is 4 =3D< then 'chkconfig whatever_service on' is not
>{ executed at post execution of the rpm script.
>But what about the general principle of "if you install a server you want=
>=20
>to run it"?

Install is not the issue, upgrade is ....

>Denis
>_______________________________________________
>Denis Pelletier
>=C9tudiant au doctorat
>sciences =E9conomiques, Universit=E9 de Montr=E9al

--- samba.spec  Thu Feb  7 12:42:06 2002
+++ samba-2.2.3a-2mdk.spec      Sat Feb  9 02:14:50 2002
@@ -611,10 +611,8 @@
 %endif %build_wins

 %preun
-
-/sbin/chkconfig --level 35 smb reset
-
 if [ $1 = 0 ] ; then
+/sbin/chkconfig --level 35 smb reset

     for i in browse.dat wins.dat brlock.tdb unexpected.tdb connections.tdb \
 locking.tdb messages.tdb;do
@@ -738,7 +736,7 @@
 /sbin/mount.smb
 /sbin/mount.smbfs
 %attr(775,root,root) %{prefix}/bin/smbmount
-%attr(775,root,root) %{prefix}/bin/smbumount
+%attr(4775,root,root) %{prefix}/bin/smbumount
 %attr(4775,root,root) %{prefix}/sbin/smbmnt
 %{_mandir}/man8/smbmnt.8*
 %{_mandir}/man8/smbmount.8*
@@ -802,6 +800,10 @@
 %endif

 %changelog
+* Sat Feb 09 2002 Buchan Milne <[EMAIL PROTECTED]> 2.2.3a-2mdk
+- Don't turn smb off on upgrade.
+- smbumount should be suid?
+
 * Thu Feb 07 2002 Sylvestre Taburet <[EMAIL PROTECTED]> 2.2.3a-1mdk
 - upped to 2.2.3a bugfix version.
 - removed suid on smb(u)mount, suid smbmnt instead.


Reply via email to