aboutsummaryrefslogtreecommitdiffstats
path: root/src/security.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-11-22 07:57:30 +0100
committerMattias Andrée <maandree@operamail.com>2013-11-22 07:57:30 +0100
commitd10cd71d3758e56ed7d59e42ec9392fed2573937 (patch)
tree9afeeb343974009b4fc12572fabd8b92b3858b98 /src/security.c
parentm (diff)
downloadlibpassphrase-d10cd71d3758e56ed7d59e42ec9392fed2573937.tar.gz
libpassphrase-d10cd71d3758e56ed7d59e42ec9392fed2573937.tar.bz2
libpassphrase-d10cd71d3758e56ed7d59e42ec9392fed2573937.tar.xz
fix chmod and chown of tty device files
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/security.c')
-rw-r--r--src/security.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/security.c b/src/security.c
index 3abd7b4..eb4bd3c 100644
--- a/src/security.c
+++ b/src/security.c
@@ -132,8 +132,8 @@ void chown_tty(uid_t owner, gid_t group, char with_fail)
vcs -= VCS_LEN;
vcsa -= VCSA_LEN;
- strcpy(vcs, VCS);
- strcpy(vcsa, VCSA);
+ strncpy(vcs, VCS, VCS_LEN);
+ strncpy(vcsa, VCSA, VCSA_LEN);
#ifdef OWN_VCS
if (chown(vcs, owner, group) && with_fail) fail("chown");