Mercurial > illumos > illumos-gate
changeset 10069:16d67aff6fa3
6859068 rbac files should not be truncated during boot
author | Casper H.S. Dik <Casper.Dik@Sun.COM> |
---|---|
date | Fri, 10 Jul 2009 21:31:05 +0200 |
parents | 42fdb9a2e805 |
children | 4d7f4e5aa1a4 |
files | usr/src/lib/libsecdb/rbac.xml usr/src/pkgdefs/common_files/i.rbac |
diffstat | 2 files changed, 21 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libsecdb/rbac.xml Fri Jul 10 07:09:52 2009 -0700 +++ b/usr/src/lib/libsecdb/rbac.xml Fri Jul 10 21:31:05 2009 +0200 @@ -1,10 +1,8 @@ <?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <!-- + CDDL HEADER START - - CDDL HEADER START - The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. @@ -50,6 +48,20 @@ <service_fmri value='svc:/system/filesystem/minimal' /> </dependency> + <dependent + name='manifest' + grouping='optional_all' + restart_on='none'> + <service_fmri value='svc:/system/manifest-import' /> + </dependent> + + <dependent + name='name-service-cache' + grouping='optional_all' + restart_on='none'> + <service_fmri value='svc:/system/name-service-cache' /> + </dependent> + <exec_method type='method' name='start'
--- a/usr/src/pkgdefs/common_files/i.rbac Fri Jul 10 07:09:52 2009 -0700 +++ b/usr/src/pkgdefs/common_files/i.rbac Fri Jul 10 21:31:05 2009 +0200 @@ -39,6 +39,8 @@ # message is displayed at the time of completion. # +umask 022 + tmp_dir=${TMPDIR:-/tmp} PATH="/usr/bin:/usr/sbin:${PATH}" @@ -290,7 +292,10 @@ # $2 is the target file # commit() { - $mv_cmd $1 $2 + # Make sure that the last mv uses rename(2) by first moving to + # the same filesystem. + $mv_cmd $1 $2.$$ + $mv_cmd $2.$$ $2 return $? }