+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!DOCTYPE policyconfig PUBLIC
- "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
-
-<!--
-Policy definitions for DeviceKit-disks
-
-Copyright (c) 2008 David Zeuthen <david@fubar.dk>
-
-NOTE: If you make changes to this file, make sure to validate the file
-using the polkit-policy-file-validate(1) tool. Changes made to this
-file are instantly applied.
--->
-
-<policyconfig>
- <vendor>The DeviceKit Project</vendor>
- <vendor_url>http://hal.freedesktop.org/docs/DeviceKit/</vendor_url>
- <icon_name>drive-removable-media</icon_name>
-
- <action id="org.freedesktop.devicekit.disks.mount-option.vfat-uid">
- <_description>vfat uid option</_description>
- <_message>Usage of the uid mount option requires privileges</_message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
- <action id="org.freedesktop.devicekit.disks.mount-option.vfat-gid">
- <_description>vfat gid option</_description>
- <_message>Usage of the gid mount option requires privileges</_message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
- <action id="org.freedesktop.devicekit.disks.mount-option.suid">
- <_description>suid option</_description>
- <_message>Usage of the suid mount option requires privileges</_message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin</allow_active>
- </defaults>
- </action>
-
- <action id="org.freedesktop.devicekit.disks.mount-option.dev">
- <_description>dev option</_description>
- <_message>Usage of the dev mount option requires privileges</_message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin</allow_active>
- </defaults>
- </action>
-
-</policyconfig>
"dmask=",
"fmask=",
"codepage=",
+ "iocharset=",
NULL};
-static const FSRestrictedMountOption vfat_restricted[] = {
- {"uid=", "org.freedesktop.devicekit.disks.mount-option.vfat-uid"},
- {"gid=", "org.freedesktop.devicekit.disks.mount-option.vfat-gid"},
- {NULL, NULL},
-};
static const char *vfat_allow_uid_self[] = {"uid=", NULL};
static const char *vfat_allow_gid_self[] = {"gid=", NULL};
"dirsync",
NULL};
-static const FSRestrictedMountOption any_restricted[] = {
- {"suid", "org.freedesktop.devicekit.disks.mount-option.suid"},
- {"dev", "org.freedesktop.devicekit.disks.mount-option.dev"},
- {NULL, NULL},
-};
-
static const FSMountOptions fs_mount_options[] = {
- {"vfat", vfat_defaults, vfat_allow, vfat_allow_uid_self, vfat_allow_gid_self, vfat_restricted},
+ {"vfat", vfat_defaults, vfat_allow, vfat_allow_uid_self, vfat_allow_gid_self},
};
/* ------------------------------------------------ */
}
}
- /* .. and finally check the mount options that requires authorization */
- if (fsmo != NULL) {
- for (n = 0; fsmo->restricted[n].mount_option != NULL; n++) {
- const char *r_mount_option = fsmo->restricted[n].mount_option;
- const char *r_authorization_needed = fsmo->restricted[n].authorization_needed;
- ep = strstr (r_mount_option, "=");
- if (ep != NULL && ep[1] == '\0') {
- ep_len = ep - r_mount_option + 1;
- if (strncmp (r_mount_option, option, ep_len) == 0) {
- allowed = TRUE;
- *auth_needed = r_authorization_needed;
- goto out;
- }
- } else {
- if (strcmp (r_mount_option, option) == 0) {
- allowed = TRUE;
- *auth_needed = r_authorization_needed;
- goto out;
- }
- }
- }
- }
- for (n = 0; any_restricted[n].mount_option != NULL; n++) {
- const char *r_mount_option = any_restricted[n].mount_option;
- const char *r_authorization_needed = any_restricted[n].authorization_needed;
- ep = strstr (r_mount_option, "=");
- if (ep != NULL && ep[1] == '\0') {
- ep_len = ep - r_mount_option + 1;
- if (strncmp (r_mount_option, option, ep_len) == 0) {
- allowed = TRUE;
- *auth_needed = r_authorization_needed;
- goto out;
- }
- } else {
- if (strcmp (r_mount_option, option) == 0) {
- allowed = TRUE;
- *auth_needed = r_authorization_needed;
- goto out;
- }
- }
- }
-
-
out:
return allowed;
}