udevil.conf allowed_options_ftpfs remove ip=*; add ip= after test #46
This commit is contained in:
parent
5801871bd3
commit
ec1b3d68f3
|
@ -4,6 +4,7 @@
|
|||
[devmon 1.1.8] improve --exec-on-unmount for mounted during startup
|
||||
[devmon 1.1.8] unset %d %l for --exec-on-unmount #56
|
||||
special handling for cifs mount ipv6 literal #46; retain literal host
|
||||
udevil.conf allowed_options_ftpfs remove ip=*; add ip= after test #46
|
||||
0.4.3 2013-12-09:
|
||||
fix default udevil.conf allowed_options missing fmask=0133 #35
|
||||
0.4.2 2013-12-04:
|
||||
|
|
|
@ -248,7 +248,7 @@ allowed_options_cifs = nosuid, noexec, nodev, ro, rw, remount, port=*, user
|
|||
allowed_options_smbfs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*
|
||||
allowed_options_sshfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, idmap=user, BatchMode=yes, port=*
|
||||
allowed_options_curlftpfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, user=*
|
||||
allowed_options_ftpfs = nosuid, noexec, nodev, noatime, ro, rw, port=*, user=*, pass=*, ip=*, root=*, uid=$UID, gid=$GID
|
||||
allowed_options_ftpfs = nosuid, noexec, nodev, noatime, ro, rw, port=*, user=*, pass=*, root=*, uid=$UID, gid=$GID
|
||||
|
||||
|
||||
# mount_point_mode, if present and set to a non-empty value, will cause udevil
|
||||
|
|
22
src/udevil.c
22
src/udevil.c
|
@ -3617,7 +3617,7 @@ _get_type:
|
|||
{
|
||||
// ftpfs
|
||||
// eg mount -n -t ftpfs none /mnt/ftpfs -o ip=192.168.1.100 user=jim pass=123abc port=21 root=/pub/updates
|
||||
net_opts = g_strdup_printf( "ip=%s", netmount->ip );
|
||||
net_opts = g_strdup( "" );
|
||||
if ( netmount->user )
|
||||
{
|
||||
str = net_opts;
|
||||
|
@ -3782,6 +3782,8 @@ _get_type:
|
|||
}
|
||||
|
||||
// add option ip= for cifs ipv6 literal
|
||||
// This is done after valid options test since ip= should not be
|
||||
// an allowed option
|
||||
if ( type == MOUNT_NET &&
|
||||
( !strcmp( fstype, "smbfs" ) || !strcmp( fstype, "cifs" ) ) )
|
||||
{
|
||||
|
@ -3790,14 +3792,26 @@ _get_type:
|
|||
g_str_has_suffix( netmount->host, "]" ) )
|
||||
{
|
||||
// ipv6 literal as host - cifs requires special ip= option
|
||||
// This is done after valid options test since ip= should not be
|
||||
// an allowed option
|
||||
str = options;
|
||||
options = g_strdup_printf( "%s,ip=%s", str, netmount->ip );
|
||||
options = g_strdup_printf( "%s%sip=%s", str && str[0] ? str : "",
|
||||
str && str[0] ? "," : "",
|
||||
netmount->ip );
|
||||
g_free( str );
|
||||
}
|
||||
}
|
||||
|
||||
// add option ip= for ftpfs
|
||||
// This is done after valid options test since ip= should not be
|
||||
// an allowed option
|
||||
if ( type == MOUNT_NET && !strcmp( fstype, "ftpfs" ) )
|
||||
{
|
||||
str = options;
|
||||
options = g_strdup_printf( "%s%sip=%s", str && str[0] ? str : "",
|
||||
str && str[0] ? "," : "",
|
||||
netmount->ip );
|
||||
g_free( str );
|
||||
}
|
||||
|
||||
// no point and not remount
|
||||
if ( !data->point && !remount )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user