From: Romain Izard <romain.izard.pro@gmail.com>
To: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
linux-mtd@lists.infradead.org,
Romain Izard <romain.izard.pro@gmail.com>
Subject: [PATCH] mkfs.ubifs: Apply squash-uids to the root node
Date: Tue, 3 Oct 2017 10:50:28 +0200 [thread overview]
Message-ID: <20171003085028.31779-1-romain.izard.pro@gmail.com> (raw)
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>
---
ubifs-utils/mkfs.ubifs/mkfs.ubifs.c | 2 ++
1 file changed, 2 insertions(+)
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;
--
2.11.0
next reply other threads:[~2017-10-03 8:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 8:50 Romain Izard [this message]
2017-10-04 8:19 ` [PATCH] mkfs.ubifs: Apply squash-uids to the root node David Oberhollenzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171003085028.31779-1-romain.izard.pro@gmail.com \
--to=romain.izard.pro@gmail.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=david.oberhollenzer@sigma-star.at \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.