From: <pl...@us...> - 2003-07-30 16:59:22
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/chown In directory sc8-pr-cvs1:/tmp/cvs-serv15900 Modified Files: Makefile chown03.c Log Message: Fix chown03, the system for finding the path to change_owner didn't always work and the test would fail Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/chown/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile 13 Mar 2003 20:09:46 -0000 1.10 +++ Makefile 30 Jul 2003 16:59:19 -0000 1.11 @@ -19,8 +19,8 @@ ########################################################################### # name of file : Makefile # ########################################################################### -CFLAGS+= -I../../../../include -LDLIBS+= -L../../../../lib -lltp +CFLAGS+= -Wall -I../../../../include +LDLIBS+= -L../../../../lib -lltp SRCS=$(wildcard chown*.c) change_owner.c TARGETS=$(patsubst %.c,%,$(SRCS)) Index: chown03.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/chown/chown03.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- chown03.c 11 Nov 2002 19:02:00 -0000 1.5 +++ chown03.c 30 Jul 2003 16:59:19 -0000 1.6 @@ -203,6 +203,7 @@ int fd; /* file handler for testfile */ char Path_name[PATH_MAX]; /* Buffer to hold command string */ char Cmd_buffer[BUFSIZ]; /* Buffer to hold command string */ + char *change_owner_path; /* capture signals */ tst_sig(FORK, DEF_HANDLER, cleanup); @@ -274,8 +275,9 @@ strcat(Path_name, "/"TESTFILE); /* Get the command name to be executed as setuid to root */ - strcpy((char *)Cmd_buffer, (const char *)test_home); - strcat((char *)Cmd_buffer, (const char *)"/change_owner "); + change_owner_path = getenv("change_owner"); + strcpy((char *)Cmd_buffer, (const char *)change_owner_path); + strcat((char *)Cmd_buffer, " "); strcat((char *)Cmd_buffer, TCID); strcat((char *)Cmd_buffer, " "); strcat((char *)Cmd_buffer, Path_name); |