summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-09-22 17:15:08 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-09-22 17:15:08 +0400
commit24d25db025ea9525ef47b434f1e54fe84b5ba0dc (patch)
treec522ad72a9a6e576a8e3f6de2c67fafc5b0ca213
parent006175566a8095c59d27d2e99971a4e937e9397f (diff)
downloadillumos-packaging-24d25db025ea9525ef47b434f1e54fe84b5ba0dc.tar.gz
dladm (2.10+1) unstable; urgency=low
* Use native version scheme * Added libdladm-create-db.patch * Moved postinst script for /etc/dladm from dladm to libdladm1
-rw-r--r--dladm/debian/changelog8
-rw-r--r--dladm/debian/libdladm1.postinst (renamed from dladm/debian/dladm.postinst)4
-rw-r--r--dladm/debian/libdladm1.postrm (renamed from dladm/debian/dladm.postrm)0
-rw-r--r--dladm/debian/patches/libdladm-create-db.patch34
-rw-r--r--dladm/debian/patches/series1
5 files changed, 43 insertions, 4 deletions
diff --git a/dladm/debian/changelog b/dladm/debian/changelog
index cb81ddc..5f36a44 100644
--- a/dladm/debian/changelog
+++ b/dladm/debian/changelog
@@ -1,3 +1,11 @@
+dladm (2.10+1) unstable; urgency=low
+
+ * Use native version scheme
+ * Added libdladm-create-db.patch
+ * Moved postinst script for /etc/dladm from dladm to libdladm1
+
+ -- Igor Pashev <pashev.igor@gmail.com> Sun, 22 Sep 2013 17:04:42 +0400
+
dladm (2.10-5) unstable; urgency=low
* Added debian/lib32dladm1.symbols because dpkg-shlibdeps failed to resolve
diff --git a/dladm/debian/dladm.postinst b/dladm/debian/libdladm1.postinst
index 585cb6d..40be68e 100644
--- a/dladm/debian/dladm.postinst
+++ b/dladm/debian/libdladm1.postinst
@@ -11,10 +11,6 @@ configure() {
# defined in base-passwd. It is specific to illumos.
chown -R dladm:netadm /etc/dladm
chmod 0755 /etc/dladm
-
- if ls /etc/dladm/* >/dev/null 2>&1; then
- chmod 0644 /etc/dladm/*
- fi
}
if [ "$1" = configure ]; then
diff --git a/dladm/debian/dladm.postrm b/dladm/debian/libdladm1.postrm
index b2f7f64..b2f7f64 100644
--- a/dladm/debian/dladm.postrm
+++ b/dladm/debian/libdladm1.postrm
diff --git a/dladm/debian/patches/libdladm-create-db.patch b/dladm/debian/patches/libdladm-create-db.patch
new file mode 100644
index 0000000..fbbb592
--- /dev/null
+++ b/dladm/debian/patches/libdladm-create-db.patch
@@ -0,0 +1,34 @@
+Description: create file if it does not exist
+Index: dladm/usr/src/lib/libdladm/common/libdladm.c
+===================================================================
+--- dladm.orig/usr/src/lib/libdladm/common/libdladm.c 2013-09-22 13:11:07.074790424 +0400
++++ dladm/usr/src/lib/libdladm/common/libdladm.c 2013-09-22 14:39:34.386136565 +0400
+@@ -711,6 +711,7 @@
+ char newfile[MAXPATHLEN];
+ char *db_basename;
+ int nfd, lock_fd;
++ int fd;
+
+ /*
+ * If we are called from a boot script such as net-physical,
+@@ -728,7 +729,7 @@
+ return (dladm_errno2status(errno));
+
+ (void) snprintf(file, MAXPATHLEN, "%s/%s", dladm_rootdir, db_file);
+- if ((fp = fopen(file, (writeop ? "r+" : "r"))) == NULL) {
++ if ((fd = open(file, (writeop ? O_RDWR | O_CREAT : O_RDONLY), db_perms)) < 0) {
+ int err = errno;
+
+ i_dladm_unlock_db(lock, lock_fd);
+@@ -737,6 +738,11 @@
+
+ return (dladm_errno2status(err));
+ }
++ if ((fp = fdopen(fd, (writeop ? "r+" : "r"))) == NULL) {
++ i_dladm_unlock_db(lock, lock_fd);
++ (void) close(fd);
++ return (dladm_errno2status(errno));
++ }
+
+ if (writeop) {
+ (void) snprintf(newfile, MAXPATHLEN, "%s/%s.new",
diff --git a/dladm/debian/patches/series b/dladm/debian/patches/series
index 94f8646..2411510 100644
--- a/dladm/debian/patches/series
+++ b/dladm/debian/patches/series
@@ -18,3 +18,4 @@ libdladm-missing-prototypes.patch
flowstat-include-time.h.patch
flowstat-fprev-may-be-used-uninitialized.patch
dlstat-fix-libinetutil-callbacks.patch
+libdladm-create-db.patch