mount: fix SIGSEV crashes
Don't close file descriptor in case file descriptor is NULL
Signed-off-by: Hans Dedecker <[email protected]>
mountd: Add static qualifier to missing variable declarations.
-Wmissing-variable-declarations is missing in gcc but available in clang.
Signed-off by: Rosen Penev <
[email protected]>
mountd: Fix fgets check.
fgets returns NULL on failure and a pointer otherwise. While comparing
it normally does not cause problems, comparing a pointer like this
is still undefined behavior.
Signed-off by: Rosen Penev <
[email protected]>
cmake: Really look for uci.h
Commit
46063a1657c4 ("cmake: Find uci.h") introduced a check against libubus.h
but mountd actually uses uci.h, so fix that.
Fixes: 46063a1657c4 ("cmake: Find uci.h")
Signed-off-by: Florian Fainelli <[email protected]>
cleanup mountpoints of partitions failing to mount
If a partition fails to mount, its autofs mountpoint is created and the mounted
flag is unset. When the partition expires or is removed, the autofs mountpoint
is cleaned up only if the mounted flag is set. Added cleanup of the autofs
mountpoint at removal and unset mounted flag.
Signed-off-by: Kristof Roelants <[email protected]>
cmake: Find uci.h
Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for uci.h. Some
external toolchains which do not include standard locations would fail
to find the header otherwise.
Signed-off-by: Florian Fainelli <[email protected]>
support for disk without partition table
if no partition found, try to mount the block device itself
Signed-off-by: Olivier Hardouin <[email protected]>
hfs+ journal partition support as read only
use hfsplus driver to mount hfs+ partition marked as journalled,
read only mounting since partial support from the kernel for write
access (as stated in Documentatiom/filesystems/hfsplus.txt)
add new index 'LASTFS' to be used in case of support for another
driver
Signed-off-by: Olivier Hardouin <[email protected]>
filesystem mount options in uci as optional parameter
Possibility to overwrite the default hardcoded settings by adding 'options'
and 'fstype' in the uci configuration. The fs names are changed in lowercase
to comply with UCI general naming.
Signed-off-by: Olivier Hardouin <[email protected]>
add hotplug events
add hotplug events (add, remove) to inform other subsystems
remove obsolete /etc/mountd/event call
Signed-off-by: Olivier Hardouin <[email protected]>
fix crash if no uci config file present
fix also possible null dereferenced pointers
Signed-off-by: Olivier Hardouin <[email protected]>
align fs_names table to indexes defined in include/fs.h
Signed-off-by: Olivier Hardouin <[email protected]>
fix gcc format security errors
Signed-off-by: Hauke Mehrtens <[email protected]>
make mountd also work for mmc partitions
Signed-off-by: John Crispin <[email protected]>
import patches/ and cmake support
Signed-off-by: John Crispin <[email protected]>