summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-12-01 04:11:20 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-12-01 04:11:20 +0000
commit9de7abd8db1336ef6223503889656edd77f74a6b (patch)
tree3fd1b6df419b4434f50100682a9656c436dcd16d /source3/client
parent3924f97eac23a38c110fc6ae764f8b02ac636fde (diff)
downloadsamba-9de7abd8db1336ef6223503889656edd77f74a6b.tar.gz
samba-9de7abd8db1336ef6223503889656edd77f74a6b.tar.bz2
samba-9de7abd8db1336ef6223503889656edd77f74a6b.zip
Link less with smbmnt and smbumount. Also change from a pstrcpy() to a
strncpy() to make it clear that we must operate on a PATH_MAX sized buffer. Andrew Bartlett (This used to be commit 49d9698ef08d66dc238b2e3469da8944b444dfa1)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/smbumount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/client/smbumount.c b/source3/client/smbumount.c
index 983ad44fa0..9ea3083a6f 100644
--- a/source3/client/smbumount.c
+++ b/source3/client/smbumount.c
@@ -90,7 +90,8 @@ canonicalize (char *path)
if (realpath (path, canonical))
return canonical;
- pstrcpy (canonical, path);
+ strncpy (canonical, path, PATH_MAX);
+ canonical[PATH_MAX] = '\0';
return canonical;
}