summaryrefslogtreecommitdiff
path: root/login-utils
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2009-10-16 01:38:29 +0200
committerKarel Zak <kzak@redhat.com>2009-10-16 01:38:29 +0200
commitad564eadf9f61022b1a5b64fcd80a540e66aaf32 (patch)
tree416682f554a493a35f7f836d9b752fc2d1297c6d /login-utils
parentb940bae39754ef9892125e9e31a45951fdc99558 (diff)
downloadutil-linux-old-ad564eadf9f61022b1a5b64fcd80a540e66aaf32.tar.gz
newgrp: use c.h, remove tailing whitespace
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils')
-rw-r--r--login-utils/newgrp.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/login-utils/newgrp.c b/login-utils/newgrp.c
index 189a3826..976a0493 100644
--- a/login-utils/newgrp.c
+++ b/login-utils/newgrp.c
@@ -14,18 +14,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+
+#include "c.h"
#include "pathnames.h"
#include "my_crypt.h"
#include "nls.h"
-#ifndef TRUE
-# define TRUE 1
-#endif
-
-#ifndef FALSE
-# define FALSE 0
-#endif
-
/* try to read password from gshadow */
static char *
get_gshadow_pwd(char *groupname)
@@ -100,14 +94,14 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
-
+
if (!(pw_entry = getpwuid(getuid()))) {
perror(_("newgrp: Who are you?"));
exit(1);
}
-
+
shell = (pw_entry->pw_shell[0] ? pw_entry->pw_shell : _PATH_BSHELL);
-
+
if (argc < 2) {
if(setgid(pw_entry->pw_gid) < 0) {
perror(_("newgrp: setgid"));