From: Marko O. <d0...@us...> - 2010-11-25 20:34:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "UNNAMED PROJECT". The branch, master has been updated via e18d0c55ce0f094075668124463c4a6a262288b8 (commit) from 5f7ab1e90999db1fd5a35bfdd55c619e0ac8bdf6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e18d0c55ce0f094075668124463c4a6a262288b8 Author: Marko Obrovac <mar...@in...> Date: Thu Nov 25 22:33:54 2010 +0100 [BUGFIX] Check the user's privileges before executing mkfs.kdfs diff --git a/tools/mkfs_kdfs.c b/tools/mkfs_kdfs.c index 56f5bfb..9a4bf32 100644 --- a/tools/mkfs_kdfs.c +++ b/tools/mkfs_kdfs.c @@ -145,7 +145,11 @@ int main(int argc, char* argv[]) // backmode = umask(0); // printf("mode %o \n", backmode); - /* TODO PRIORITY 3: Only root should be granted to call mkfs.kdfs */ + // check for root privileges + if (getuid() != 0) { + fprintf(stderr, "Error: you need root privileges to run this program!\n"); + exit(EXIT_FAILURE); + } if (argc != 3) { usage(); ----------------------------------------------------------------------- Summary of changes: tools/mkfs_kdfs.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) hooks/post-receive -- UNNAMED PROJECT |