From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 13/17] pathnames: clean up various user database paths
Date: Mon, 5 Mar 2012 20:38:50 +0100 [thread overview]
Message-ID: <1330976334-10751-14-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1330976334-10751-1-git-send-email-kerolasa@iki.fi>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
include/pathnames.h | 17 ++++-------------
login-utils/setpwnam.h | 2 +-
tests/expected/paths/built-in | 8 --------
tests/helpers/test_pathnames.c | 8 --------
4 files changed, 5 insertions(+), 30 deletions(-)
diff --git a/include/pathnames.h b/include/pathnames.h
index 6c00d9f..70c6ecf 100644
--- a/include/pathnames.h
+++ b/include/pathnames.h
@@ -51,23 +51,14 @@
/* used in login-utils/shutdown.c */
/* used in login-utils/setpwnam.h and login-utils/islocal.c */
-#define _PATH_PASSWD "/etc/passwd"
+#define _PATH_PASSWD "/etc/passwd"
-/* used in login-utils/newgrp */
+/* used in login-utils/newgrp and login-utils/setpwnam.h*/
#define _PATH_GSHADOW "/etc/gshadow"
/* used in login-utils/setpwnam.h */
-#define _PATH_PTMP "/etc/ptmp"
-#define _PATH_PTMPTMP "/etc/ptmptmp"
-#define _PATH_GROUP "/etc/group"
-#define _PATH_GTMP "/etc/gtmp"
-#define _PATH_GTMPTMP "/etc/gtmptmp"
-#define _PATH_SHADOW_PASSWD "/etc/shadow"
-#define _PATH_SHADOW_PTMP "/etc/sptmp"
-#define _PATH_SHADOW_PTMPTMP "/etc/sptmptmp"
-#define _PATH_SHADOW_GROUP "/etc/gshadow"
-#define _PATH_SHADOW_GTMP "/etc/sgtmp"
-#define _PATH_SHADOW_GTMPTMP "/etc/sgtmptmp"
+#define _PATH_GROUP "/etc/group"
+#define _PATH_SHADOW_PASSWD "/etc/shadow"
#define _PATH_SHELLS "/etc/shells"
/* used in term-utils/agetty.c */
diff --git a/login-utils/setpwnam.h b/login-utils/setpwnam.h
index 6a4dbb7..7d69445 100644
--- a/login-utils/setpwnam.h
+++ b/login-utils/setpwnam.h
@@ -18,7 +18,7 @@
# define PASSWD_FILE _PATH_PASSWD
# define GROUP_FILE _PATH_GROUP
# define SHADOW_FILE _PATH_SHADOW_PASSWD
-# define SGROUP_FILE _PATH_SHADOW_GROUP
+# define SGROUP_FILE _PATH_GSHADOW
#else
# define PASSWD_FILE "/tmp/passwd"
# define GROUP_FILE "/tmp/group"
diff --git a/tests/expected/paths/built-in b/tests/expected/paths/built-in
index 51372de..836eff5 100644
--- a/tests/expected/paths/built-in
+++ b/tests/expected/paths/built-in
@@ -19,17 +19,9 @@
_PATH_UMOUNT /bin/umount
_PATH_PASSWD /etc/passwd
_PATH_GSHADOW /etc/gshadow
- _PATH_PTMP /etc/ptmp
- _PATH_PTMPTMP /etc/ptmptmp
_PATH_GROUP /etc/group
- _PATH_GTMP /etc/gtmp
- _PATH_GTMPTMP /etc/gtmptmp
_PATH_SHADOW_PASSWD /etc/shadow
- _PATH_SHADOW_PTMP /etc/sptmp
-_PATH_SHADOW_PTMPTMP /etc/sptmptmp
_PATH_SHADOW_GROUP /etc/gshadow
- _PATH_SHADOW_GTMP /etc/sgtmp
-_PATH_SHADOW_GTMPTMP /etc/sgtmptmp
_PATH_WORDS /usr/share/dict/words
_PATH_WORDS_ALT /usr/share/dict/web2
_PATH_UMOUNT /bin/umount
diff --git a/tests/helpers/test_pathnames.c b/tests/helpers/test_pathnames.c
index 0270938..962fe5a 100644
--- a/tests/helpers/test_pathnames.c
+++ b/tests/helpers/test_pathnames.c
@@ -52,17 +52,9 @@ struct hlpPath paths[] =
DEF_HLPPATH(_PATH_UMOUNT),
DEF_HLPPATH(_PATH_PASSWD),
DEF_HLPPATH(_PATH_GSHADOW),
- DEF_HLPPATH(_PATH_PTMP),
- DEF_HLPPATH(_PATH_PTMPTMP),
DEF_HLPPATH(_PATH_GROUP),
- DEF_HLPPATH(_PATH_GTMP),
- DEF_HLPPATH(_PATH_GTMPTMP),
DEF_HLPPATH(_PATH_SHADOW_PASSWD),
- DEF_HLPPATH(_PATH_SHADOW_PTMP),
- DEF_HLPPATH(_PATH_SHADOW_PTMPTMP),
DEF_HLPPATH(_PATH_SHADOW_GROUP),
- DEF_HLPPATH(_PATH_SHADOW_GTMP),
- DEF_HLPPATH(_PATH_SHADOW_GTMPTMP),
DEF_HLPPATH(_PATH_WORDS),
DEF_HLPPATH(_PATH_WORDS_ALT),
DEF_HLPPATH(_PATH_UMOUNT),
--
1.7.9.2
next prev parent reply other threads:[~2012-03-05 19:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 13:35 [pull] fixes to todo items etc Sami Kerola
2012-03-05 12:38 ` Karel Zak
2012-03-05 19:38 ` Sami Kerola
2012-03-05 19:38 ` [PATCH 01/17] docs: add deprecation comments Sami Kerola
2012-03-05 19:38 ` [PATCH 02/17] docs: TODO removal, login-utils error printing Sami Kerola
2012-03-05 19:38 ` [PATCH 03/17] sfdisk: use rpmatch to yes/no question Sami Kerola
2012-03-05 19:38 ` [PATCH 04/17] mesg: " Sami Kerola
2012-03-05 19:38 ` [PATCH 05/17] vipw: " Sami Kerola
2012-03-05 19:38 ` [PATCH 06/17] docs: TODO removal, rpmatch task is done Sami Kerola
2012-03-05 19:38 ` [PATCH 07/17] chfn: use pathnames.h for paths Sami Kerola
2012-03-05 19:38 ` [PATCH 08/17] chsh: " Sami Kerola
2012-03-05 19:38 ` [PATCH 09/17] lib: add fileutils function collection Sami Kerola
[not found] ` <"1 330984305.2953.25.camel"@offbook>
[not found] ` <"1330984305.2953.25.camel"@offbook>
2012-03-05 21:51 ` Davidlohr Bueso
2012-03-09 7:56 ` Sami Kerola
2012-03-09 11:48 ` Davidlohr Bueso
2012-03-09 12:20 ` Karel Zak
2012-03-10 11:49 ` Sami Kerola
2012-03-05 19:38 ` [PATCH 10/17] wall: use xmkstemp for temporary file Sami Kerola
2012-03-05 19:38 ` [PATCH 11/17] setpwnam: use xmkstemp() and lckpwdf() Sami Kerola
2012-03-05 19:38 ` [PATCH 12/17] vipw: " Sami Kerola
2012-03-05 19:38 ` Sami Kerola [this message]
2012-03-05 20:44 ` [PATCH 13/17] pathnames: clean up various user database paths Sami Kerola
2012-03-05 19:38 ` [PATCH 14/17] docs: TODO removal, ldattach usage is done Sami Kerola
2012-03-05 19:38 ` [PATCH 15/17] include: add asprintf wrapper Sami Kerola
2012-03-05 19:52 ` Dave Reisner
2012-03-05 20:47 ` Sami Kerola
2012-03-05 19:38 ` [PATCH 16/17] xalloc: use xasprintf in all files Sami Kerola
2012-03-05 19:38 ` [PATCH 17/17] build-sys: fix chkdupexe regression Sami Kerola
2012-03-20 8:07 ` [pull] fixes to todo items etc Karel Zak
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=1330976334-10751-14-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox