diff options
author | Romain Izard <romain.izard.pro@gmail.com> | 2017-10-03 10:50:28 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2017-10-04 10:14:19 +0200 |
commit | afba4fc3b7e989d8b23176ffbf6e84164920a079 (patch) | |
tree | 77c6aacc1260e9aa4991a857b5aa416ba2dd6723 /ubifs-utils/mkfs.ubifs/mkfs.ubifs.c | |
parent | 3a3478472fe289ed72a91a1cc9de07dfbab4a047 (diff) |
mkfs.ubifs: Apply squash-uids to the root node
The root node of the file system needs to be handled as a special case
when removing the owner information from the input.
Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/mkfs.ubifs/mkfs.ubifs.c')
-rw-r--r-- | ubifs-utils/mkfs.ubifs/mkfs.ubifs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c index 9e69a4f..d432dfe 100644 --- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c +++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c @@ -1831,6 +1831,8 @@ static int write_data(void) if (err) return sys_err_msg("bad root file-system directory '%s'", root); + if (squash_owner) + root_st.st_uid = root_st.st_gid = 0; } else { root_st.st_mtime = time(NULL); root_st.st_atime = root_st.st_ctime = root_st.st_mtime; |