summaryrefslogtreecommitdiff
path: root/src/rc/checkpath.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-01-14 05:39:01 +0000
committerMike Frysinger <vapier@gentoo.org>2008-01-14 05:39:01 +0000
commit357d3ecf84c8a3094f8a0edd8136ff5d7383e328 (patch)
tree8e2919fc29c19e921c067e5206cc536ab9722401 /src/rc/checkpath.c
parent0b815cc67ff02673a61bead2002bc21d5187d1a7 (diff)
downloadopenrc-357d3ecf84c8a3094f8a0edd8136ff5d7383e328.tar.gz
openrc-357d3ecf84c8a3094f8a0edd8136ff5d7383e328.tar.bz2
openrc-357d3ecf84c8a3094f8a0edd8136ff5d7383e328.tar.xz
fix --mode parsing by checking the proper function parameter
Diffstat (limited to 'src/rc/checkpath.c')
-rw-r--r--src/rc/checkpath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c
index dc783af..2fdaf22 100644
--- a/src/rc/checkpath.c
+++ b/src/rc/checkpath.c
@@ -109,7 +109,7 @@ static int do_check (char *path, uid_t uid, gid_t gid, mode_t mode, int file)
static int parse_mode (mode_t *mode, char *text)
{
/* Check for a numeric mode */
- if ((*mode - '0') < 8) {
+ if ((*text - '0') < 8) {
char *p;
unsigned long l = strtoul (text, &p, 8);
if (*p || l > 07777U) {