[bug-notifications] [cswclassutils 0003685]: cswpreserveconf

Mantis Bug Tracker noreply at opencsw.org
Wed Jul 1 16:47:38 CEST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://www.opencsw.org/mantis/view.php?id=3685 
====================================================================== 
Reported By:                ja
Assigned To:                bonivart
====================================================================== 
Project:                    cswclassutils
Issue ID:                   3685
Category:                   packaging
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             2009-05-23 11:39 CEST
Last Modified:              2009-07-01 16:47 CEST
====================================================================== 
Summary:                    cswpreserveconf
Description: 
Config files handled with the class cswpreserveconf have always the
ownerships root:other and not the desired ownership, which is specified for
the .CSW file.

Example:

In CSWnagios.prototype

f cswpreserveconf /opt/csw/nagios/etc/cgi.cfg.CSW 0664 nagios nagios

results in

-rw-r--r--   1 root     other      10695 May 22 22:19 cgi.cfg
-rw-rw-r--   1 nagios   nagios     10695 Mar 20 22:26 cgi.cfg.CSW

and not as expected in 

-rw-r--r--   1 nagios   nagios      10695 May 22 22:19 cgi.cfg
====================================================================== 

---------------------------------------------------------------------- 
 (0006376) bonivart (manager) - 2009-07-01 16:47
 http://www.opencsw.org/mantis/view.php?id=3685#c6376 
---------------------------------------------------------------------- 
Patch for cswcpsampleconf:

--- i.cswcpsampleconf.090701    Wed Jul  1 13:59:09 2009
+++ i.cswcpsampleconf   Wed Jul  1 16:47:10 2009
@@ -31,7 +31,13 @@
                echo $confdest already exists. Not overwriting
        else
                echo Copying sample config to $confdest
-               cp -p $dest $confdest
+               contents=`grep "^$dest" /var/sadm/install/contents`
+               mode=`echo $contents | awk '{print $4}'`
+               user=`echo $contents | awk '{print $5}'`
+               group=`echo $contents | awk '{print $6}'`
+               cp $dest $confdest
+               chmod $mode $confdest
+               chown $user:$group $confdest
        fi
 done




More information about the bug-notifications mailing list