diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-12-01 04:11:20 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-12-01 04:11:20 +0000 |
commit | 9de7abd8db1336ef6223503889656edd77f74a6b (patch) | |
tree | 3fd1b6df419b4434f50100682a9656c436dcd16d | |
parent | 3924f97eac23a38c110fc6ae764f8b02ac636fde (diff) | |
download | samba-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)
-rw-r--r-- | source3/Makefile.in | 7 | ||||
-rw-r--r-- | source3/client/smbumount.c | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index a8e0c06789..d4e11982c3 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -434,8 +434,7 @@ MOUNT_OBJ = client/smbmount.o \ MNT_OBJ = client/smbmnt.o -UMOUNT_OBJ = client/smbumount.o \ - $(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) +UMOUNT_OBJ = client/smbumount.o NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(UBIQX_OBJ) \ $(LIBSMB_OBJ) $(LIB_OBJ) @@ -703,11 +702,11 @@ bin/smbmount@EXEEXT@: $(MOUNT_OBJ) bin/.dummy bin/smbmnt@EXEEXT@: $(MNT_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(MNT_OBJ) $(LDFLAGS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(MNT_OBJ) $(LDFLAGS) bin/smbumount@EXEEXT@: $(UMOUNT_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(UMOUNT_OBJ) $(LDFLAGS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(UMOUNT_OBJ) $(LDFLAGS) bin/testparm@EXEEXT@: $(TESTPARM_OBJ) @BUILD_POPT@ bin/.dummy @echo Linking $@ 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; } |