From 9de7abd8db1336ef6223503889656edd77f74a6b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 1 Dec 2002 04:11:20 +0000 Subject: 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) --- source3/Makefile.in | 7 +++---- source3/client/smbumount.c | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source3') 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; } -- cgit