summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2009-12-27 16:17:33 +0000
committerabs <abs@pkgsrc.org>2009-12-27 16:17:33 +0000
commit0eaedac081e3ce4e288fa31fd3315bff4280a18e (patch)
treedf0fa7de93fe163d89455fd0a71ea86f9e82964d /sysutils
parent1d3097fbf0deeb25181d9ac0aed98158fd1ffd26 (diff)
downloadpkgsrc-0eaedac081e3ce4e288fa31fd3315bff4280a18e.tar.gz
When mounting a filesystem on behalf of a user treat __NetBSD__ similarly
to __FreeBSD__ and chown the mountpoint to the user. With this change, and the recent one to policykit automounting works on NetBSD
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/hal/Makefile4
-rw-r--r--sysutils/hal/distinfo4
-rw-r--r--sysutils/hal/patches/patch-aa36
3 files changed, 30 insertions, 14 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile
index 165021cf4b6..26109347c72 100644
--- a/sysutils/hal/Makefile
+++ b/sysutils/hal/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.42 2009/10/15 00:30:38 jmcneill Exp $
+# $NetBSD: Makefile,v 1.43 2009/12/27 16:17:33 abs Exp $
DISTNAME= hal-0.5.11
-PKGREVISION= 25
+PKGREVISION= 26
CATEGORIES= sysutils
MASTER_SITES= http://hal.freedesktop.org/releases/
EXTRACT_SUFX= .tar.bz2
diff --git a/sysutils/hal/distinfo b/sysutils/hal/distinfo
index 9bd2fa11783..f70b789f408 100644
--- a/sysutils/hal/distinfo
+++ b/sysutils/hal/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.14 2009/09/14 15:18:36 joerg Exp $
+$NetBSD: distinfo,v 1.15 2009/12/27 16:17:33 abs Exp $
SHA1 (hal-0.5.11.tar.bz2) = 1ddb7895d2ddc2464b553ad11f7ba38860478ae9
RMD160 (hal-0.5.11.tar.bz2) = 741cfe82f0bc2d67106b24cfe526a754ab36e45f
Size (hal-0.5.11.tar.bz2) = 1281251 bytes
-SHA1 (patch-aa) = cad685075f8246397e3783fb3e9d094a2bee4d04
+SHA1 (patch-aa) = 7caee5b1af8f76d30ebac437507a99031982d1c2
SHA1 (patch-ab) = 03723893f9219967a0e3b48c1a03592688389234
SHA1 (patch-ac) = 5836bb68f4742bdccc9c61fbf8cc86020007a0a5
SHA1 (patch-ad) = 2a2732f82a4fd8d7ffa311b4a0e747208dc9ad1c
diff --git a/sysutils/hal/patches/patch-aa b/sysutils/hal/patches/patch-aa
index ec694affd31..c0c8e6a2980 100644
--- a/sysutils/hal/patches/patch-aa
+++ b/sysutils/hal/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.4 2008/12/20 21:11:05 jmcneill Exp $
+$NetBSD: patch-aa,v 1.5 2009/12/27 16:17:34 abs Exp $
---- tools/hal-storage-mount.c.orig 2008-05-07 19:24:23.000000000 -0400
-+++ tools/hal-storage-mount.c 2008-12-20 15:34:05.000000000 -0500
+--- tools/hal-storage-mount.c.orig 2008-05-07 23:24:23.000000000 +0000
++++ tools/hal-storage-mount.c
@@ -31,7 +31,7 @@
#include <string.h>
#include <glib.h>
@@ -11,7 +11,7 @@ $NetBSD: patch-aa,v 1.4 2008/12/20 21:11:05 jmcneill Exp $
#include <fstab.h>
#include <sys/param.h>
#include <sys/ucred.h>
-@@ -41,6 +41,13 @@
+@@ -41,6 +41,14 @@
#elif sun
#include <sys/mnttab.h>
#include <sys/vfstab.h>
@@ -22,10 +22,11 @@ $NetBSD: patch-aa,v 1.4 2008/12/20 21:11:05 jmcneill Exp $
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <unistd.h>
++#include <pwd.h>
#else
#include <mntent.h>
#endif
-@@ -54,10 +61,14 @@
+@@ -54,10 +62,14 @@
#include "hal-storage-shared.h"
@@ -41,7 +42,7 @@ $NetBSD: patch-aa,v 1.4 2008/12/20 21:11:05 jmcneill Exp $
#elif sun
#define MOUNT "/sbin/mount"
#define MOUNT_OPTIONS "noexec,nosuid"
-@@ -421,7 +432,7 @@ device_is_mounted (const char *device, c
+@@ -421,7 +433,7 @@ device_is_mounted (const char *device, c
static const char *
map_fstype (const char *fstype)
{
@@ -50,7 +51,7 @@ $NetBSD: patch-aa,v 1.4 2008/12/20 21:11:05 jmcneill Exp $
if (! strcmp (fstype, "iso9660"))
return "cd9660";
else if (! strcmp (fstype, "ext2"))
-@@ -430,6 +441,13 @@ map_fstype (const char *fstype)
+@@ -430,6 +442,13 @@ map_fstype (const char *fstype)
return "ext2fs";
else if (! strcmp (fstype, "vfat"))
return "msdosfs";
@@ -64,7 +65,13 @@ $NetBSD: patch-aa,v 1.4 2008/12/20 21:11:05 jmcneill Exp $
#elif sun
if (! strcmp (fstype, "iso9660"))
return "hsfs";
-@@ -475,6 +493,11 @@ handle_mount (LibHalContext *hal_ctx,
+@@ -470,11 +489,16 @@ handle_mount (LibHalContext *hal_ctx,
+ gboolean is_remount;
+ gboolean explicit_mount_point_given;
+ const char *end;
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ struct passwd *pw;
uid_t calling_uid;
gid_t calling_gid;
#endif
@@ -76,7 +83,7 @@ $NetBSD: patch-aa,v 1.4 2008/12/20 21:11:05 jmcneill Exp $
const char *label;
const char *uuid;
-@@ -731,7 +754,6 @@ handle_mount (LibHalContext *hal_ctx,
+@@ -731,7 +755,6 @@ handle_mount (LibHalContext *hal_ctx,
/* construct arguments to mount */
na = 0;
@@ -84,7 +91,7 @@ $NetBSD: patch-aa,v 1.4 2008/12/20 21:11:05 jmcneill Exp $
if (strlen (mount_fstype) > 0) {
mount_do_fstype = (char *) map_fstype (mount_fstype);
} else if (volume == NULL) {
-@@ -742,8 +764,29 @@ handle_mount (LibHalContext *hal_ctx,
+@@ -742,8 +765,29 @@ handle_mount (LibHalContext *hal_ctx,
} else {
mount_do_fstype = "auto";
}
@@ -116,3 +123,12 @@ $NetBSD: patch-aa,v 1.4 2008/12/20 21:11:05 jmcneill Exp $
args[na++] = "-o";
#ifdef HAVE_UMOUNT_HAL
+@@ -814,7 +858,7 @@ handle_mount (LibHalContext *hal_ctx,
+ unknown_error ("Cannot create mount directory");
+ }
+
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ calling_uid = (uid_t) strtol (invoked_by_uid, (char **) NULL, 10);
+ pw = getpwuid (calling_uid);
+ if (pw != NULL) {