summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorNathan Bush <nathan.bush@oracle.com>2010-08-12 14:07:03 -0700
committerNathan Bush <nathan.bush@oracle.com>2010-08-12 14:07:03 -0700
commit29c3196fe2acc65721d8b9b5ea708d3a87facde0 (patch)
tree2d3d09b59805aa60dce1314ea5fdf373616820d4 /usr/src
parent8d0bff0b85e6c35d0d862cff1607cded58bf2341 (diff)
downloadillumos-joyent-29c3196fe2acc65721d8b9b5ea708d3a87facde0.tar.gz
6962539 i.rbac doesn't remove Sun Copyright, and includes multiple Oracle copyrights.
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libsecdb/common/i.rbac29
1 files changed, 29 insertions, 0 deletions
diff --git a/usr/src/lib/libsecdb/common/i.rbac b/usr/src/lib/libsecdb/common/i.rbac
index 1c3faeb8fb..0b20be0356 100644
--- a/usr/src/lib/libsecdb/common/i.rbac
+++ b/usr/src/lib/libsecdb/common/i.rbac
@@ -80,6 +80,20 @@ dbmerge() {
$mv_cmd $4.$$ $4.old
fi
#
+# If the new file has an Oracle copyright, remove both the Sun and Oracle
+# copyrights from the old file.
+#
+ oracle_cr=`${egrep_cmd} '^# Copyright.*Oracle and/or its affiliates.' \
+ $3 2>/dev/null`
+ if [ -n "${oracle_cr}" ]; then
+ $sed_cmd -e '/^# Copyright.*Sun Microsystems, Inc./d' \
+ -e '/^# All rights reserved./d' \
+ -e '/^# Use is subject to license terms./d' \
+ -e '/^# Copyright.*Oracle and\/or its affiliates./d' \
+ $4.old > $4.$$ 2>/dev/null
+ $mv_cmd $4.$$ $4.old
+ fi
+#
# If the new file has the CDDL, remove it from the old file.
#
newcr=`${egrep_cmd} '^# CDDL HEADER START' $3 2>/dev/null`
@@ -111,6 +125,21 @@ dbmerge() {
$rm_cmd $4.old
$sed_cmd -n -e '/^[^#]/,$d' -e '/^##/,$d' -e p $3 >> $4
#
+# If the output file now has both Sun and Oracle copyrights, remove
+# the Sun copyright.
+#
+ sun_cr=`${egrep_cmd} '^# Copyright.*Sun Microsystems, Inc.' \
+ $4 2>/dev/null`
+ oracle_cr=`${egrep_cmd} '^# Copyright.*Oracle and/or its affiliates.' \
+ $4 2>/dev/null`
+ if [ -n "${sun_cr}" ] && [ -n "${oracle_cr}" ]; then
+ $sed_cmd -e '/^# Copyright.*Sun Microsystems, Inc./d' \
+ -e '/^# All rights reserved./d' \
+ -e '/^# Use is subject to license terms./d' \
+ $4 > $4.$$ 2>/dev/null
+ $mv_cmd $4.$$ $4
+ fi
+#
# Handle line continuations (trailing \)
#
$sed_cmd \