Corinna Vinschen wrote: > I would like to propose to do all the work in the csih script, like > this: > > csih_make_dir "${LOCALSTATEDIR}/run" > chmod 1777 "${LOCALSTATEDIR}/run" > csih_make_dir "${LOCALSTATEDIR}/log" > chmod 1777 "${LOCALSTATEDIR}/log" > csih_make_dir "${LOCALSTATEDIR}/empty" > chmod 755 "${LOCALSTATEDIR}/empty" > [... checking permissions ...] > csih_make_dir "${SYSCONFDIR}" > chmod 755 "${LOCALSTATEDIR}/etc" ^^^^^^^^^^^^^^^^^^^^^ I assume you mean "${SYSCONFDIR}" here. However, if the chmod command itself fails, that should not be an error, because this code is in _csih_setup -- which is always run by the major entry points.
including those that might be called by user-config scripts, which are typically run without elevated privilege. So, if I try to chmod and the command itself fails -- but the permissions are still okay, then I shouldn't have an error. > The /var dirs are now (setup 2.609) created with 01777 permissions > anyway, but it can't hurt to keep this code in. The 01777 permissions > make sure that all daemons can create their files in /var/run, /var/log. > > The code in /bin/ssh-host-config would go away entirely. The script > would also test for the *next* csih version 0.1.8. Sure, that works. Try the following. I hesitate to actually release 0.1.8 until you finish your testing cycle with the new openssh. Let's coordinate the release(s). -- Chuck --- cygwin-service-installation-helper.sh 17 Aug 2008 01:44:43 -0000 1.12 +++ cygwin-service-installation-helper.sh 20 Aug 2008 16:29:09 -0000 @@ -2030,11 +2030,18 @@ then csih_error "Problem with ${LOCALSTATEDIR} directory. Exiting." fi - + + # attempt to set permissions, but not an error if fail + # will verify that we actually HAVE correct permissions below. csih_make_dir "${LOCALSTATEDIR}/run" + chmod 1777 "${LOCALSTATEDIR}/run" || /bin/true + csih_make_dir "${LOCALSTATEDIR}/log" + chmod 1777 "${LOCALSTATEDIR}/log" || /bin/true + csih_make_dir "${LOCALSTATEDIR}/empty" - + chmod 755 "${LOCALSTATEDIR}/empty" || /bin/true + # daemons need write access to /var/run to create pid file if ! csih_check_access "${LOCALSTATEDIR}/run" .w. then @@ -2055,7 +2062,8 @@ # script to explicitly check accees to the specific configuration # files inside /etc... csih_make_dir "${SYSCONFDIR}" - + chmod 755 "${LOCALSTATEDIR}/etc" || /bin/true + _csih_setup_already_called=1 fi } # === End of _csih_setup() === # -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/