Hiltjo Posthuma
ee5b04a7a3
switch_root: execv: show error string
2015-05-10 13:41:23 +01:00
sin
10d6bf2f4d
Stop using *_FILENO
2014-11-30 13:12:33 +00:00
sin
6f7f387352
Stop using EXIT_{SUCCESS,FAILURE}
2014-10-02 23:47:39 +01:00
Hiltjo Posthuma
291aedb875
code consistency fixes
2014-07-09 15:08:01 +01:00
sin
86060b535c
Fix includes across all tools
2014-06-30 19:04:47 +01:00
sin
32efa14595
Fix switch_root delete_content()
2014-06-27 12:55:33 +01:00
sin
941ffd2aed
Bail out on path truncation
2014-06-27 11:52:17 +01:00
sin
b5c3bcda7d
Ensure that path[0] == '\0' upon entry to delete_content()
...
As a quick fix, staticise path to ensure that it is zero-filled
upon initial entry to the function.
In rare cases there's a possible buffer overflow and/or path
mess up on the first call to strlcat() with path[0] != '\0'.
The proper fix is to utilize util/recurse.c but the traversal
order cannot be specified at the moment.
Expect a better fix in the future.
2014-06-27 11:52:10 +01:00
sin
505bb70e89
Fix char **argv to char *argv[]
2014-04-18 11:52:31 +01:00
sin
6c19de185a
Inline the *_MAGIC defines to avoid a dependency on kernel_headers
2014-04-14 14:59:39 +01:00
sin
e43a102f11
Inlcude <string.h> as well for strcmp()
...
Sort include files.
2014-04-14 12:49:25 +01:00
sin
bed72cf409
Simplify skipping "." and ".." in switch_root
2014-04-14 11:32:59 +01:00
sin
33be4f39c2
Fixup error message in switch_root
2014-04-14 11:27:33 +01:00
sin
6cf5c4dfba
Include limits.h instead of linux/limits.h
2014-04-14 11:24:02 +01:00
sin
4d7091cae9
Use *_FILENO instead of hardcoding constants
2014-04-14 11:22:47 +01:00
sin
fc4dc81535
Some more stylistic changes to switch_root
2014-04-14 11:20:25 +01:00
sin
38a0ce084f
Remember to return EXIT_FAILURE from main()
...
Doesn't matter in this case but gets rid of compiler warnings.
2014-04-14 09:47:13 +01:00
FRIGN
c7d72a8a56
Implement switch_root
2014-04-14 09:44:38 +01:00