If the path is still outside /mnt/ after all the previous checks and
enforces have been applied, overwrite the path to "/mnt/".
This is usefull in the following scenario:
- "/mnt/tmp" is a soft link to "/tmp"
- $path is pushed from the web gui as "/"
- $dirpath is pushed from the web gui as "tmp"
The init script prepends "/mnt/", the $path becomes "/mnt/tmp".
Further, the smb.conf would receive "path = /mnt/tmp" and
samba would export for share "/tmp".
A while-loop (that always prepends "/mnt/" to $(readlink -f $path)
if it does not start with "/mnt")
would not prevent this case exactly because
the soft link and the target directory have the same name,
thus the loop would never end.
When checknig that path starts with /mnt/, path should not include
softlinks, "." or "..". This prevents the obvoius case of sharing the
"/mnt/../" path, which will jump out of the restricted /mnt/.
Assuming that path and dirpath are both empty, path becomes
"/", which is not empty. The -z $path check after was useless.
Changed the order of this two operations.
-------------------------------------------------------------------------------
* 38610d3 added some tests to make sure indexing outside of array doesn't happen and changed router ports to dump the clients in port.clients insted of by macaddress
* eda05ba added checkes everywere in questd.c to make sure arrays are never indexed outside of its range
* c0259d5 doubbled the size of MAX_PORT and MAX_VIF TODO: fix all for loop so they never go higher than MAX_something insted of checking for null
-------------------------------------------------------------------------------
commit 38610d31f53c5c36cacc698d57f6313130f65465
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-07-13 17:27:50 +0200
added some tests to make sure indexing outside of array doesn't happen and
changed router ports to dump the clients in port.clients insted of by
macaddress
Base directory -> /
questd.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit eda05ba6abef93ca5cb268dca87ac1bb1614ec6b
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-07-13 12:13:29 +0200
added checkes everywere in questd.c to make sure arrays are never indexed
outside of its range
Base directory -> /
questd.c | 59 ++++++++++++++++++++++++++---------------------------------
questd.h | 2 +-
2 files changed, 27 insertions(+), 34 deletions(-)
-------------------------------------------------------------------------------
commit c0259d51821bc08f0405530b829d64ed32ed1ea9
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-07-13 10:35:38 +0200
doubbled the size of MAX_PORT and MAX_VIF TODO: fix all for loop so they
never go higher than MAX_something insted of checking for null
Base directory -> /
questd.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
* eda05ba added checkes everywere in questd.c to make sure arrays are never indexed outside of its range
-------------------------------------------------------------------------------
commit eda05ba6abef93ca5cb268dca87ac1bb1614ec6b
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-07-13 12:13:29 +0200
added checkes everywere in questd.c to make sure arrays are never indexed
outside of its range
Base directory -> /
questd.c | 59 ++++++++++++++++++++++++++---------------------------------
questd.h | 2 +-
2 files changed, 27 insertions(+), 34 deletions(-)
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
* c0259d5 doubbled the size of MAX_PORT and MAX_VIF TODO: fix all for loop so they never go higher than MAX_something insted of checking for null
-------------------------------------------------------------------------------
commit c0259d51821bc08f0405530b829d64ed32ed1ea9
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-07-13 10:35:38 +0200
doubbled the size of MAX_PORT and MAX_VIF TODO: fix all for loop so they
never go higher than MAX_something insted of checking for null
Base directory -> /
questd.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
* dfcf187 Do not try to set flash state to led panel leds.
-------------------------------------------------------------------------------
commit dfcf187cf3961841dee750371d3999d23297b74c
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-07-11 17:04:50 +0200
Do not try to set flash state to led panel leds.
Ask driver if it supports hardware flash if not do not set it. This to avoid
a printout from the actual driver that complain it can't set this state.
refs #9720
Base directory -> /
src/led.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
* 1dad4bf Workaround for preventing daemon respawn when we want it to fully exit.
* 8276cd6 Don't get confused if same handset gets registered twice in a row.
* 29c6c1b - Initialize data structures for UBUS dynamically since on ARM we unregister and reregister over and over. During unregister the data becomes invalid (for some unknown reason) and thus needs to be recreated.
* bf4e2eb check /tmp/defaultreset to understand if defaultreset is in place
* 96a1dd8 adapt to new reboot reason check method
* 440a5d6 unregister handsets upon defaultreset fixes#9458
-------------------------------------------------------------------------------
commit 1dad4bfc86b0167e7c39fee7fbd4bf0935b4fa4a
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-07-08 15:03:46 +0200
Workaround for preventing daemon respawn when we want it to fully exit.
Base directory -> /
files/dect | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 8276cd67ab7659365e44b4eda883e322280048cd
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-07-07 15:54:04 +0200
Don't get confused if same handset gets registered twice in a row.
Base directory -> /
src/handset.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
-------------------------------------------------------------------------------
commit 29c6c1b57aac14c32ec473335c873c64b470a8dc
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-07-07 15:52:19 +0200
- Initialize data structures for UBUS dynamically since on ARM we unregister
and reregister over and over. During unregister the data becomes invalid
(for some unknown reason) and thus needs to be recreated.
Base directory -> /
src/ubus.c | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
-------------------------------------------------------------------------------
commit bf4e2eb41e2bc71c335ef63f7fa4db76c125edbf
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-07-05 14:33:21 +0200
check /tmp/defaultreset to understand if defaultreset is in place
Base directory -> /
files/dect | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 96a1dd8a6cbee324ae45382fc8ea41c5d21e2d80
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-07-05 12:29:11 +0200
adapt to new reboot reason check method
Base directory -> /
files/dect | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 440a5d6b6e6e4f9fa50ae7ba29c7fecc72148b66
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-07-05 11:43:55 +0200
unregister handsets upon defaultreset fixes#9458
Base directory -> /
files/dect | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
* bf4e2eb check /tmp/defaultreset to understand if defaultreset is in place
-------------------------------------------------------------------------------
commit bf4e2eb41e2bc71c335ef63f7fa4db76c125edbf
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-07-05 14:33:21 +0200
check /tmp/defaultreset to understand if defaultreset is in place
Base directory -> /
files/dect | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------