aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-11-22 07:43:26 +0100
committerMattias Andrée <maandree@operamail.com>2013-11-22 07:43:26 +0100
commit6b2d968051f2dccb198eb5cba35f72ac82ac7cf8 (patch)
tree181ffc0dd6e3c7527d9f885fb3548b091713e0dd
parentoptionally use PAM (diff)
downloadlibpassphrase-6b2d968051f2dccb198eb5cba35f72ac82ac7cf8.tar.gz
libpassphrase-6b2d968051f2dccb198eb5cba35f72ac82ac7cf8.tar.bz2
libpassphrase-6b2d968051f2dccb198eb5cba35f72ac82ac7cf8.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--Makefile3
-rw-r--r--src/security.c8
2 files changed, 5 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index fa4d685..b0518f5 100644
--- a/Makefile
+++ b/Makefile
@@ -31,10 +31,9 @@ auth_pam = 1
H = \#
VCS_LEN = $(shell vcs="$(VCS)" ; echo "$${$(H)vcs}")
VCSA_LEN = $(shell vcsa="$(VCSA)" ; echo "$${$(H)vcsa}")
-VCS_VCSA_LEN = $(shell (echo $(VCS_LEN) ; echo $(VCSA_LEN)) | sort -n | tail -n 1)
STR_DEFS = TTY_GROUP DEFAULT_HOME DEFAULT_SH DEFAULT_SHELL DEFAULT_TERM PATH PATH_ROOT VCS VCSA
-VRB_DEFS = VCS_LEN VCSA_LEN VCS_VCSA_LEN
+VRB_DEFS = VCS_LEN VCSA_LEN
STR_CPPFLAGS = $(foreach D, $(STR_DEFS), -D'$(D)="$($(D))"')
VRB_CPPFLAGS = $(foreach D, $(VRB_DEFS), -D'$(D)=$($(D))') -DAUTH=$(auth_$(AUTH))
diff --git a/src/security.c b/src/security.c
index 626110a..3abd7b4 100644
--- a/src/security.c
+++ b/src/security.c
@@ -113,13 +113,13 @@ void chown_tty(uid_t owner, gid_t group, char with_fail)
if (ioctl(STDIN_FILENO, VT_GETSTATE, &vtstat) == 0)
{
int n = vtstat.v_active;
- char _vcs[VCS_VCSA_LEN + 6];
- char _vcsa[VCS_VCSA_LEN + 6];
+ char _vcs[VCS_LEN + 6];
+ char _vcsa[VCSA_LEN + 6];
char* vcs = _vcs;
char* vcsa = _vcsa;
- vcs += VCS_VCSA_LEN + 6;
- vcsa += VCS_VCSA_LEN + 6;
+ vcs += VCS_LEN + 6;
+ vcsa += VCSA_LEN + 6;
if (n)
{