|
@@ -2,6 +2,18 @@
|
|
|
|
|
|
package water
|
|
package water
|
|
|
|
|
|
|
|
+type DevicePermissions struct {
|
|
|
|
+ // ID of the user which will be granted ownership of the device.
|
|
|
|
+ // If set to a negative value, the owner value will not be changed.
|
|
|
|
+ // By default, Linux sets the owner to -1, which allows any user.
|
|
|
|
+ Owner uint
|
|
|
|
+
|
|
|
|
+ // ID of the group which will be granted access to the device.
|
|
|
|
+ // If set to a negative value, the group value will not be changed.
|
|
|
|
+ // By default, Linux sets the group to -1, which allows any group.
|
|
|
|
+ Group uint
|
|
|
|
+}
|
|
|
|
+
|
|
// PlatformSpecificParams defines parameters in Config that are specific to
|
|
// PlatformSpecificParams defines parameters in Config that are specific to
|
|
// Linux. A zero-value of such type is valid, yielding an interface
|
|
// Linux. A zero-value of such type is valid, yielding an interface
|
|
// with OS defined name.
|
|
// with OS defined name.
|
|
@@ -15,20 +27,12 @@ type PlatformSpecificParams struct {
|
|
// Enable or disable persistence mode for the interface device.
|
|
// Enable or disable persistence mode for the interface device.
|
|
Persist bool
|
|
Persist bool
|
|
|
|
|
|
- // ID of the user which will be granted ownership of the device.
|
|
|
|
- // If set to a negative value, the owner value will not be changed.
|
|
|
|
- // By default, Linux sets the owner to -1, which allows any user.
|
|
|
|
- Owner int
|
|
|
|
-
|
|
|
|
- // ID of the group which will be granted access to the device.
|
|
|
|
- // If set to a negative value, the group value will not be changed.
|
|
|
|
- // By default, Linux sets the group to -1, which allows any group.
|
|
|
|
- Group int
|
|
|
|
|
|
+ // Owner and Group permissions for the device.
|
|
|
|
+ // A zero-value of this field, i.e. nil, indicates that no changes to owner
|
|
|
|
+ // or group will be made.
|
|
|
|
+ Permissions *DevicePermissions
|
|
}
|
|
}
|
|
|
|
|
|
func defaultPlatformSpecificParams() PlatformSpecificParams {
|
|
func defaultPlatformSpecificParams() PlatformSpecificParams {
|
|
- return PlatformSpecificParams{
|
|
|
|
- Owner: -1,
|
|
|
|
- Group: -1,
|
|
|
|
- }
|
|
|
|
|
|
+ return PlatformSpecificParams{}
|
|
}
|
|
}
|