diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-05-02 09:49:19 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-05-02 10:53:51 +1000 |
commit | 9712912dfcdb7894ab1111bf67572ba0f6d3d5de (patch) | |
tree | 055773b6ebaa2aafbd79112d4b74ec34f3429002 /testsuite | |
parent | 3408c1ce6c79ae887255ebc14104814365d28a2b (diff) | |
download | samba-9712912dfcdb7894ab1111bf67572ba0f6d3d5de.tar.gz |
testsuite/libsmbclient: Remove unused and expensive-to-link testsuite
This testsuite never got off the ground, and unlike the other
libsmbclient tests, it is not integrated into make test, has no driver
script we could integrate.
As it has been in this state for 10 years, and adding it to the compile
did not find any link-time issues (particularly in comparison to the
link-time cost for so many individual binaries), I am now removing them.
The libsmbclient examples are seperate to this, and remain in
examples/libsmbclient.
Andrew Bartlett
Diffstat (limited to 'testsuite')
148 files changed, 0 insertions, 11525 deletions
diff --git a/testsuite/libsmbclient/src/Makefile b/testsuite/libsmbclient/src/Makefile deleted file mode 100644 index 1f640ca502..0000000000 --- a/testsuite/libsmbclient/src/Makefile +++ /dev/null @@ -1,854 +0,0 @@ -CC = gcc -CFLAGS = -Wall -W -O2 -g -I../../../source3/include -LFLAGS = -L../../../source3/bin - -LIBS= -L/usr/lib -lsmbclient -ltalloc -ltdb -lwbclient -INCPATH= -I. -I/usr/include -I./include -BIN_DIR=bin - -SUB_DIRS=init fstat open unlink chown close opendir closedir rename lseek lseekdir stat \ - getdents creat read readdir mkdir rmdir write chmod open_print_job list_print_jobs \ - print_file telldir unlink_print_job - -MAKEDIR = || exec false; \ - if test -d "$$dir"; then :; else \ - echo mkdir "$$dir"; \ - mkdir -p "$$dir" >/dev/null 2>&1 || \ - test -d "$$dir" || \ - mkdir "$$dir" || \ - exec false; fi || exec false - -G_INIT = $(BIN_DIR)/init_1 \ - $(BIN_DIR)/init_2 \ - $(BIN_DIR)/init_3 \ - $(BIN_DIR)/init_4 - -G_FSTAT = $(BIN_DIR)/fstat_1 \ - $(BIN_DIR)/fstat_2 \ - $(BIN_DIR)/fstat_3 \ - $(BIN_DIR)/fstat_4 \ - $(BIN_DIR)/fstat_5 \ - $(BIN_DIR)/fstat_6 - -G_OPEN = $(BIN_DIR)/open_1 \ - $(BIN_DIR)/open_2 \ - $(BIN_DIR)/open_3 \ - $(BIN_DIR)/open_4 \ - $(BIN_DIR)/open_5 - -G_UNLINK = $(BIN_DIR)/unlink_1 \ - $(BIN_DIR)/unlink_2 \ - $(BIN_DIR)/unlink_3 \ - $(BIN_DIR)/unlink_4 \ - $(BIN_DIR)/unlink_5 \ - $(BIN_DIR)/unlink_6 \ - $(BIN_DIR)/unlink_7 \ - $(BIN_DIR)/unlink_8 \ - $(BIN_DIR)/unlink_9 \ - $(BIN_DIR)/unlink_10 \ - $(BIN_DIR)/unlink_11 \ - $(BIN_DIR)/unlink_12 - - -G_CLOSE = $(BIN_DIR)/close_1 \ - $(BIN_DIR)/close_2 - -G_OPENDIR = $(BIN_DIR)/opendir_1 \ - $(BIN_DIR)/opendir_2 \ - $(BIN_DIR)/opendir_3 \ - $(BIN_DIR)/opendir_4 - -G_CLOSEDIR = $(BIN_DIR)/closedir_1 \ - $(BIN_DIR)/closedir_2 \ - $(BIN_DIR)/closedir_3 \ - $(BIN_DIR)/closedir_4 - -G_RENAME = $(BIN_DIR)/rename_1 \ - $(BIN_DIR)/rename_2 \ - $(BIN_DIR)/rename_3 \ - $(BIN_DIR)/rename_4 \ - $(BIN_DIR)/rename_5 \ - $(BIN_DIR)/rename_6 \ - $(BIN_DIR)/rename_7 \ - $(BIN_DIR)/rename_8 \ - $(BIN_DIR)/rename_9 \ - $(BIN_DIR)/rename_10 \ - $(BIN_DIR)/rename_11 \ - $(BIN_DIR)/rename_12 \ - $(BIN_DIR)/rename_13 \ - $(BIN_DIR)/rename_14 - -G_LSEEK = $(BIN_DIR)/lseek_1 \ - $(BIN_DIR)/lseek_2 \ - $(BIN_DIR)/lseek_3 \ - $(BIN_DIR)/lseek_4 \ - $(BIN_DIR)/lseek_5 \ - $(BIN_DIR)/lseek_6 \ - $(BIN_DIR)/lseek_7 \ - $(BIN_DIR)/lseek_8 - -G_LSEEKDIR = $(BIN_DIR)/lseekdir_1 \ - $(BIN_DIR)/lseekdir_2 \ - $(BIN_DIR)/lseekdir_3 \ - $(BIN_DIR)/lseekdir_4 \ - $(BIN_DIR)/lseekdir_5 \ - $(BIN_DIR)/lseekdir_6 - -G_STAT = $(BIN_DIR)/stat_1 \ - $(BIN_DIR)/stat_2 \ - $(BIN_DIR)/stat_3 \ - $(BIN_DIR)/stat_4 \ - $(BIN_DIR)/stat_5 \ - $(BIN_DIR)/stat_6 \ - $(BIN_DIR)/stat_k - -G_GETDENTS = $(BIN_DIR)/getdents_1 \ - $(BIN_DIR)/getdents_2 \ - $(BIN_DIR)/getdents_3 \ - $(BIN_DIR)/getdents_4 \ - $(BIN_DIR)/getdents_5 - -G_CREAT = $(BIN_DIR)/creat_1 \ - $(BIN_DIR)/creat_2 \ - $(BIN_DIR)/creat_3 - -G_READ = $(BIN_DIR)/read_1 \ - $(BIN_DIR)/read_2 \ - $(BIN_DIR)/read_3 \ - $(BIN_DIR)/read_4 \ - $(BIN_DIR)/read_5 \ - $(BIN_DIR)/read_6 \ - $(BIN_DIR)/read_7 \ - $(BIN_DIR)/read_8 \ - $(BIN_DIR)/read_9 \ - $(BIN_DIR)/read_10 \ - $(BIN_DIR)/read_11 \ - $(BIN_DIR)/read_12 \ - $(BIN_DIR)/read_13 - -G_MKDIR = $(BIN_DIR)/mkdir_1 \ - $(BIN_DIR)/mkdir_2 \ - $(BIN_DIR)/mkdir_3 \ - $(BIN_DIR)/mkdir_4 - -G_RMDIR = $(BIN_DIR)/rmdir_1 \ - $(BIN_DIR)/rmdir_2 \ - $(BIN_DIR)/rmdir_3 \ - $(BIN_DIR)/rmdir_4 \ - $(BIN_DIR)/rmdir_5 \ - $(BIN_DIR)/rmdir_6 - -G_READDIR = $(BIN_DIR)/readdir_1 \ - $(BIN_DIR)/readdir_2 \ - $(BIN_DIR)/readdir_3 \ - $(BIN_DIR)/readdir_4 \ - $(BIN_DIR)/readdir_5 - -G_WRITE = $(BIN_DIR)/write_1 \ - $(BIN_DIR)/write_2 \ - $(BIN_DIR)/write_3 \ - $(BIN_DIR)/write_4 \ - $(BIN_DIR)/write_5 \ - $(BIN_DIR)/write_6 \ - $(BIN_DIR)/write_7 \ - $(BIN_DIR)/write_8 \ - $(BIN_DIR)/write_9 \ - $(BIN_DIR)/write_10 \ - $(BIN_DIR)/write_11 \ - $(BIN_DIR)/write_12 \ - $(BIN_DIR)/write_13 - -G_TELLDIR = $(BIN_DIR)/telldir_1 \ - $(BIN_DIR)/telldir_2 \ - $(BIN_DIR)/telldir_3 \ - $(BIN_DIR)/telldir_4 \ - $(BIN_DIR)/telldir_5 - -G_CHMOD = $(BIN_DIR)/chmod_1 - -G_CHOWN = $(BIN_DIR)/chown_1 - -G_PRINT_FILE = $(BIN_DIR)/print_file_1 \ - $(BIN_DIR)/print_file_2 \ - $(BIN_DIR)/print_file_3 \ - $(BIN_DIR)/print_file_4 - -G_OPEN_PRINT_JOB = $(BIN_DIR)/open_print_job_1 \ - $(BIN_DIR)/open_print_job_2 - -G_LIST_PRINT_JOBS = $(BIN_DIR)/list_print_jobs_1 \ - $(BIN_DIR)/list_print_jobs_2 \ - $(BIN_DIR)/list_print_jobs_3 \ - $(BIN_DIR)/list_print_jobs_4 \ - $(BIN_DIR)/list_print_jobs_5 \ - $(BIN_DIR)/list_print_jobs_6 \ - $(BIN_DIR)/list_print_jobs_7 - -G_UNLINK_PRINT_JOB = $(BIN_DIR)/unlink_print_job_1 \ - $(BIN_DIR)/unlink_print_job_2 \ - $(BIN_DIR)/unlink_print_job_3 \ - $(BIN_DIR)/unlink_print_job_4 \ - $(BIN_DIR)/unlink_print_job_5 - -GROUPS= $(G_CHMOD) $(G_CHOWN) $(G_CLOSE) $(G_CLOSEDIR) $(G_CREAT) $(G_FSTAT)\ - $(G_GETDENTS) $(G_INIT) $(G_LIST_PRINT_JOBS) $(G_LSEEK) $(G_LSEEKDIR) \ - $(G_MKDIR) $(G_OPEN) $(G_OPENDIR) $(G_OPEN_PRINT_JOB) $(G_PRINT_FILE)\ - $(G_READ) $(G_READDIR) $(G_RENAME) $(G_RMDIR) $(G_STAT) $(G_TELLDIR) $(G_UNLINK) \ - $(G_UNLINK_PRINT_JOB) $(G_WRITE) - -.c.o: - @echo Compiling $*.c - @$(CC) -c $(CFLAGS) -o $@ $(INCPATH) $< - - -all: $(GROUPS) - -init: $(G_INIT) -fstat: $(G_FSTAT) -open: $(G_OPEN) -unlink: $(G_UNLINK) -chown: $(G_CHOWN) -close: $(G_CLOSE) -opendir: $(G_OPENDIR) -closedir: $(G_CLOSEDIR) -rename: $(G_RENAME) -readdir: $(G_READDIR) -lseek: $(G_LSEEK) -lseekdir: $(G_LSEEKDIR) -stat: $(G_STAT) -getdents: $(G_GETDENTS) -creat: $(G_CREAT) -read: $(G_READ) -mkdir: $(G_MKDIR) -rmdir: $(G_RMDIR) -write: $(G_WRITE) -chmod: $(G_CHMOD) -telldir: $(G_TELLDIR) -print_file: $(G_PRINT_FILE) -open_print_job: $(G_OPEN_PRINT_JOB) -list_print_jobs: $(G_LIST_PRINT_JOBS) -unlink_print_job: $(G_UNLINK_PRINT_JOB) - - -$(BIN_DIR)/testsmbc: testsmbc.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ testsmbc.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/init_1: init/init_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ init/init_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/init_2: init/init_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ init/init_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/init_3: init/init_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ init/init_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/init_4: init/init_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ init/init_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/fstat_1: fstat/fstat_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ fstat/fstat_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/fstat_2: fstat/fstat_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ fstat/fstat_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/fstat_3: fstat/fstat_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ fstat/fstat_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/fstat_4: fstat/fstat_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ fstat/fstat_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/fstat_5: fstat/fstat_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ fstat/fstat_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/fstat_6: fstat/fstat_6.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ fstat/fstat_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/open_1: open/open_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ open/open_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/open_2: open/open_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ open/open_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/open_3: open/open_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ open/open_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/open_4: open/open_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ open/open_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/open_5: open/open_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ open/open_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_1: unlink/unlink_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_2: unlink/unlink_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_3: unlink/unlink_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_4: unlink/unlink_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_5: unlink/unlink_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_6: unlink/unlink_6.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_7: unlink/unlink_7.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_7.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_8: unlink/unlink_8.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_8.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_9: unlink/unlink_9.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_9.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_10: unlink/unlink_10.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_10.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_11: unlink/unlink_11.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_11.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_12: unlink/unlink_12.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ unlink/unlink_12.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/chown_1: chown/chown_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ chown/chown_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/close_1: close/close_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ close/close_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/close_2: close/close_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ close/close_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/opendir_1: opendir/opendir_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ opendir/opendir_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/opendir_2: opendir/opendir_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ opendir/opendir_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/opendir_3: opendir/opendir_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ opendir/opendir_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/opendir_4: opendir/opendir_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ opendir/opendir_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/closedir_1: closedir/closedir_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ closedir/closedir_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/closedir_2: closedir/closedir_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ closedir/closedir_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/closedir_3: closedir/closedir_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ closedir/closedir_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/closedir_4: closedir/closedir_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ closedir/closedir_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_1: rename/rename_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_2: rename/rename_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_3: rename/rename_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_4: rename/rename_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_5: rename/rename_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_6: rename/rename_6.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_7: rename/rename_7.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_7.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_8: rename/rename_8.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_8.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_9: rename/rename_9.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_9.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_10: rename/rename_10.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_10.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_11: rename/rename_11.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_11.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_12: rename/rename_12.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_12.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_13: rename/rename_13.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_13.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rename_14: rename/rename_14.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rename/rename_14.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseek_1: lseek/lseek_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseek/lseek_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseek_2: lseek/lseek_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseek/lseek_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseek_3: lseek/lseek_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseek/lseek_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseek_4: lseek/lseek_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseek/lseek_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseek_5: lseek/lseek_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseek/lseek_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseek_6: lseek/lseek_6.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseek/lseek_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseek_7: lseek/lseek_7.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseek/lseek_7.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseek_8: lseek/lseek_8.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseek/lseek_8.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseekdir_1: lseekdir/lseekdir_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseekdir/lseekdir_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseekdir_2: lseekdir/lseekdir_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseekdir/lseekdir_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseekdir_3: lseekdir/lseekdir_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseekdir/lseekdir_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseekdir_4: lseekdir/lseekdir_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseekdir/lseekdir_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseekdir_5: lseekdir/lseekdir_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseekdir/lseekdir_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/lseekdir_6: lseekdir/lseekdir_6.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ lseekdir/lseekdir_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/stat_1: stat/stat_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ stat/stat_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/stat_2: stat/stat_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ stat/stat_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/stat_3: stat/stat_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ stat/stat_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/stat_4: stat/stat_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ stat/stat_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/stat_5: stat/stat_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ stat/stat_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/stat_6: stat/stat_6.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ stat/stat_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/stat_k: stat/stat_k.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ stat/stat_k.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/getdents_1: getdents/getdents_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ getdents/getdents_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/getdents_2: getdents/getdents_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ getdents/getdents_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/getdents_3: getdents/getdents_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ getdents/getdents_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/getdents_4: getdents/getdents_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ getdents/getdents_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/getdents_5: getdents/getdents_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ getdents/getdents_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/creat_1: creat/creat_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ creat/creat_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/creat_2: creat/creat_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ creat/creat_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/creat_3: creat/creat_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ creat/creat_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/mkdir_1: mkdir/mkdir_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ mkdir/mkdir_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/mkdir_2: mkdir/mkdir_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ mkdir/mkdir_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/mkdir_3: mkdir/mkdir_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ mkdir/mkdir_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/mkdir_4: mkdir/mkdir_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ mkdir/mkdir_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/readdir_1: readdir/readdir_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ readdir/readdir_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/readdir_2: readdir/readdir_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ readdir/readdir_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/readdir_3: readdir/readdir_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ readdir/readdir_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/readdir_4: readdir/readdir_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ readdir/readdir_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/readdir_5: readdir/readdir_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ readdir/readdir_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rmdir_1: rmdir/rmdir_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rmdir/rmdir_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rmdir_2: rmdir/rmdir_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rmdir/rmdir_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rmdir_3: rmdir/rmdir_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rmdir/rmdir_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rmdir_4: rmdir/rmdir_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rmdir/rmdir_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rmdir_5: rmdir/rmdir_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rmdir/rmdir_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/rmdir_6: rmdir/rmdir_6.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ rmdir/rmdir_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_1: write/write_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_2: write/write_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_3: write/write_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_4: write/write_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_5: write/write_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_6: write/write_6.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_7: write/write_7.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_7.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_8: write/write_8.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_8.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_9: write/write_9.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_9.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_10: write/write_10.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_10.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_11: write/write_11.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_11.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_12: write/write_12.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_12.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/write_13: write/write_13.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ write/write_13.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_1: read/read_1.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_2: read/read_2.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_3: read/read_3.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_4: read/read_4.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_5: read/read_5.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_6: read/read_6.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_7: read/read_7.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_7.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_8: read/read_8.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_8.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_9: read/read_9.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_9.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_10: read/read_10.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_10.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_11: read/read_11.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_11.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_12: read/read_12.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_12.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/read_13: read/read_13.o - @echo Linking $@ - @$(CC) $(LFLAGS) -o $@ read/read_13.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/chmod_1: chmod/chmod_1.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ chmod/chmod_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/telldir_1: telldir/telldir_1.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ telldir/telldir_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/telldir_2: telldir/telldir_2.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ telldir/telldir_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/telldir_3: telldir/telldir_3.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ telldir/telldir_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/telldir_4: telldir/telldir_4.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ telldir/telldir_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/telldir_5: telldir/telldir_5.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ telldir/telldir_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/print_file_1: print_file/print_file_1.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ print_file/print_file_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/print_file_2: print_file/print_file_2.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ print_file/print_file_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/print_file_3: print_file/print_file_3.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ print_file/print_file_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/print_file_4: print_file/print_file_4.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ print_file/print_file_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/open_print_job_1: open_print_job/open_print_job_1.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ open_print_job/open_print_job_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/open_print_job_2: open_print_job/open_print_job_2.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ open_print_job/open_print_job_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/list_print_jobs_1: list_print_jobs/list_print_jobs_1.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/list_print_jobs_2: list_print_jobs/list_print_jobs_2.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/list_print_jobs_3: list_print_jobs/list_print_jobs_3.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/list_print_jobs_4: list_print_jobs/list_print_jobs_4.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/list_print_jobs_5: list_print_jobs/list_print_jobs_5.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_5.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/list_print_jobs_6: list_print_jobs/list_print_jobs_6.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_6.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/list_print_jobs_7: list_print_jobs/list_print_jobs_7.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_7.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_print_job_1: unlink_print_job/unlink_print_job_1.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_1.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_print_job_2: unlink_print_job/unlink_print_job_2.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_2.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_print_job_3: unlink_print_job/unlink_print_job_3.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_3.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_print_job_4: unlink_print_job/unlink_print_job_4.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_4.o $(INCPATH) $(LIBS) - -$(BIN_DIR)/unlink_print_job_5: unlink_print_job/unlink_print_job_5.o - @echo Linking $@ - @dir=$(BIN_DIR) $(MAKEDIR)@ - @$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_5.o $(INCPATH) $(LIBS) - - -clean: - @for i in $(SUB_DIRS); do \ - rm -f $$i/*.o; \ - done - - @rm -f $(GROUPS) - @rm -rf $(BIN_DIR) - @echo "Done" - diff --git a/testsuite/libsmbclient/src/chmod/chmod_1.c b/testsuite/libsmbclient/src/chmod/chmod_1.c deleted file mode 100644 index 4a317c073b..0000000000 --- a/testsuite/libsmbclient/src/chmod/chmod_1.c +++ /dev/null @@ -1,59 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - fd = smbc_init(auth_fn, 0); - - if ( fd < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/chown/chown_1.c b/testsuite/libsmbclient/src/chown/chown_1.c deleted file mode 100644 index 4a317c073b..0000000000 --- a/testsuite/libsmbclient/src/chown/chown_1.c +++ /dev/null @@ -1,59 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - fd = smbc_init(auth_fn, 0); - - if ( fd < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/close/close_1.c b/testsuite/libsmbclient/src/close/close_1.c deleted file mode 100644 index 6b60e59dba..0000000000 --- a/testsuite/libsmbclient/src/close/close_1.c +++ /dev/null @@ -1,59 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - err = smbc_close(fd); - - if ( err < 0 ) - err = 1; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/close/close_2.c b/testsuite/libsmbclient/src/close/close_2.c deleted file mode 100644 index bd31ab11fd..0000000000 --- a/testsuite/libsmbclient/src/close/close_2.c +++ /dev/null @@ -1,57 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/closedir/closedir_1.c b/testsuite/libsmbclient/src/closedir/closedir_1.c deleted file mode 100644 index c8092d7067..0000000000 --- a/testsuite/libsmbclient/src/closedir/closedir_1.c +++ /dev/null @@ -1,65 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_rmdir(url); - smbc_mkdir(url,0666); - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - err = smbc_closedir(dh); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/closedir/closedir_2.c b/testsuite/libsmbclient/src/closedir/closedir_2.c deleted file mode 100644 index 25e14367f5..0000000000 --- a/testsuite/libsmbclient/src/closedir/closedir_2.c +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_rmdir(url); - smbc_mkdir(url,0666); - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - smbc_closedir(dh); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/closedir/closedir_3.c b/testsuite/libsmbclient/src/closedir/closedir_3.c deleted file mode 100644 index 7cdbb94b57..0000000000 --- a/testsuite/libsmbclient/src/closedir/closedir_3.c +++ /dev/null @@ -1,63 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - err = smbc_closedir(dh); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/closedir/closedir_4.c b/testsuite/libsmbclient/src/closedir/closedir_4.c deleted file mode 100644 index 1cc859940d..0000000000 --- a/testsuite/libsmbclient/src/closedir/closedir_4.c +++ /dev/null @@ -1,59 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - smbc_closedir(dh); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/creat/creat_1.c b/testsuite/libsmbclient/src/creat/creat_1.c deleted file mode 100644 index 1134d45737..0000000000 --- a/testsuite/libsmbclient/src/creat/creat_1.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_creat(url, 0666); - - if ( fd < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/creat/creat_2.c b/testsuite/libsmbclient/src/creat/creat_2.c deleted file mode 100644 index ac4934f679..0000000000 --- a/testsuite/libsmbclient/src/creat/creat_2.c +++ /dev/null @@ -1,63 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - smbc_close(fd); - fd = 0; - fd = smbc_creat(url, 0666); - - if ( fd < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/creat/creat_3.c b/testsuite/libsmbclient/src/creat/creat_3.c deleted file mode 100644 index 2d48eb547c..0000000000 --- a/testsuite/libsmbclient/src/creat/creat_3.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_creat(url, 0666); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/fstat/fstat_1.c b/testsuite/libsmbclient/src/fstat/fstat_1.c deleted file mode 100644 index ff05c2d543..0000000000 --- a/testsuite/libsmbclient/src/fstat/fstat_1.c +++ /dev/null @@ -1,62 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - - if ( argc == 4 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - - smbc_init(auth_fn, 0); - - fd = 11234; - err = smbc_fstat(fd,&st); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/fstat/fstat_2.c b/testsuite/libsmbclient/src/fstat/fstat_2.c deleted file mode 100644 index 20d3d67c5f..0000000000 --- a/testsuite/libsmbclient/src/fstat/fstat_2.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - - if ( argc == 4 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - - smbc_init(auth_fn, 0); - - fd = 11234; - smbc_fstat(fd,&st); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/fstat/fstat_3.c b/testsuite/libsmbclient/src/fstat/fstat_3.c deleted file mode 100644 index e406ef62c9..0000000000 --- a/testsuite/libsmbclient/src/fstat/fstat_3.c +++ /dev/null @@ -1,69 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - - err = smbc_fstat(fd, &st); - smbc_close(fd); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/fstat/fstat_4.c b/testsuite/libsmbclient/src/fstat/fstat_4.c deleted file mode 100644 index e406ef62c9..0000000000 --- a/testsuite/libsmbclient/src/fstat/fstat_4.c +++ /dev/null @@ -1,69 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - - err = smbc_fstat(fd, &st); - smbc_close(fd); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/fstat/fstat_5.c b/testsuite/libsmbclient/src/fstat/fstat_5.c deleted file mode 100644 index b07e56538b..0000000000 --- a/testsuite/libsmbclient/src/fstat/fstat_5.c +++ /dev/null @@ -1,77 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - - smbc_fstat(fd,&st); - - smbc_close(fd); - free(message); - - if ( st.st_size != msg_len ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/fstat/fstat_6.c b/testsuite/libsmbclient/src/fstat/fstat_6.c deleted file mode 100644 index 73248d0c2b..0000000000 --- a/testsuite/libsmbclient/src/fstat/fstat_6.c +++ /dev/null @@ -1,80 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - unsigned int mode_mask = 0; - char url[MAX_BUFF_SIZE]; - char* message; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - - smbc_fstat(fd,&st); - - smbc_close(fd); - free(message); - - mode_mask = mode_mask | S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; /* 0666 or 33206 */ - - if ( st.st_mode != mode_mask ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/getdents/getdents_1.c b/testsuite/libsmbclient/src/getdents/getdents_1.c deleted file mode 100644 index aea6ad0dc8..0000000000 --- a/testsuite/libsmbclient/src/getdents/getdents_1.c +++ /dev/null @@ -1,72 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - /* int dirsize = 0; */ - /* int dircount = 0; */ - - struct smbc_dirent *dirptr; - - char url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - - dh = smbc_opendir(url); - err = smbc_getdents( dh, dirptr, sizeof(dirbuff)); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/getdents/getdents_2.c b/testsuite/libsmbclient/src/getdents/getdents_2.c deleted file mode 100644 index 921486cd07..0000000000 --- a/testsuite/libsmbclient/src/getdents/getdents_2.c +++ /dev/null @@ -1,67 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - /* int dirsize = 0; */ - /* int dircount = 0; */ - - struct smbc_dirent *dirptr; - - char url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - - dh = smbc_opendir(url); - err = smbc_getdents( dh, dirptr, sizeof(dirbuff)); - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/getdents/getdents_3.c b/testsuite/libsmbclient/src/getdents/getdents_3.c deleted file mode 100644 index fefc75676c..0000000000 --- a/testsuite/libsmbclient/src/getdents/getdents_3.c +++ /dev/null @@ -1,155 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - int j = 0; - char *file_name; - char *tmp_file_ptr; - int direntsize = 0; - int diramount = 0; - - struct smbc_dirent *dirptr; - - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - diramount = smbc_getdents( dh, dirptr, sizeof(dirbuff)); - - err = 0; - i = 0; - memset(buff, '\0', MAX_BUFF_SIZE); - memset(tmp_file_ptr, '\0', MAX_BUFF_SIZE-9); - - while ( diramount > 0 ) - { - direntsize = dirptr->dirlen; - /* printf("Name: %s\n",dirptr->name); */ - if ( j == 0 ) - { - if ( !(( strncmp(dirptr->name,".",1) == 0 )) ) - { - break; - err = 1; - } - - } else if ( j == 1 ) { - - if ( !(( strncmp(dirptr->name,"..",2) == 0 )) ) - { - break; - err = 1; - } - - } else if ( j > 1 ) { - - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - - if ( !((strcmp(dirptr->name,file_url) == 0 )) ) /* make sure entries match */ - { - err = 1; - break; - } - - i++; - - } - - dirptr = (struct smbc_dirent *) ((char *) dirptr + direntsize); - diramount -= direntsize; - j++; - - } - - if ( ! err ) - { - if ( (j - 2) != entry_num ) /* Make sure that all entries created are counted and returned - minus . and .. */ - err = 1; - } - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/getdents/getdents_4.c b/testsuite/libsmbclient/src/getdents/getdents_4.c deleted file mode 100644 index fb6b4a7f64..0000000000 --- a/testsuite/libsmbclient/src/getdents/getdents_4.c +++ /dev/null @@ -1,101 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - char *file_name; - char *tmp_file_ptr; - int diramount = 0; - - struct smbc_dirent *dirptr; - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - diramount = smbc_getdents( dh, dirptr, 20 /*sizeof(dirbuff)*/ ); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/getdents/getdents_5.c b/testsuite/libsmbclient/src/getdents/getdents_5.c deleted file mode 100644 index 352a1440e4..0000000000 --- a/testsuite/libsmbclient/src/getdents/getdents_5.c +++ /dev/null @@ -1,106 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - char *file_name; - char *tmp_file_ptr; - int diramount = 0; - - struct smbc_dirent *dirptr; - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - diramount = smbc_getdents( dh, dirptr, 20 /* sizeof(dirbuff)*/); - - if ( diramount < 0 ) - - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/init/init_1.c b/testsuite/libsmbclient/src/init/init_1.c deleted file mode 100644 index bc928ac3d5..0000000000 --- a/testsuite/libsmbclient/src/init/init_1.c +++ /dev/null @@ -1,18 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - - -int main() -{ - int err = -1; - - err = smbc_init(NULL, 0); - - if ( err < 0 ) - err = 1; - - return err; - -} diff --git a/testsuite/libsmbclient/src/init/init_2.c b/testsuite/libsmbclient/src/init/init_2.c deleted file mode 100644 index 120160297b..0000000000 --- a/testsuite/libsmbclient/src/init/init_2.c +++ /dev/null @@ -1,23 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - - -int main(int argc, char **argv ) -{ - int err = -1; - - if ( argc > 1 ) - { - err = smbc_init(NULL, atoi(argv[1])); - - if ( err < 0 ) - err = 1; - - } - - return err; - -} diff --git a/testsuite/libsmbclient/src/init/init_3.c b/testsuite/libsmbclient/src/init/init_3.c deleted file mode 100644 index fea009ae73..0000000000 --- a/testsuite/libsmbclient/src/init/init_3.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - - err = smbc_init(auth_fn, atoi(argv[4])); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/init/init_4.c b/testsuite/libsmbclient/src/init/init_4.c deleted file mode 100644 index d8e44b50ee..0000000000 --- a/testsuite/libsmbclient/src/init/init_4.c +++ /dev/null @@ -1,18 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - - -int main( ) -{ - int err = -1; - - err = smbc_init(NULL, 0); - - err = errno; - - return err; - -} diff --git a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_1.c b/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_1.c deleted file mode 100644 index cf290100ca..0000000000 --- a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_1.c +++ /dev/null @@ -1,109 +0,0 @@ -#include <stdio.h> -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - -int call_back_flag; -int print_queue_empty; - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn_2(struct print_job_info *pji) -{ - print_queue_empty = 0; - g_print_id = pji->id; -} - -static void print_list_fn(struct print_job_info *pji) -{ - - call_back_flag = 1; - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - call_back_flag = 0; - print_queue_empty = 0; - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - - while ( ! print_queue_empty ) /* Wait until the queue is empty */ - { - sleep(1); - print_queue_empty = 1; - smbc_list_print_jobs(url,print_list_fn_2); - } - - smbc_list_print_jobs(url,print_list_fn); - - if ( call_back_flag ) - - err = 0; - - else - err = 1; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_2.c b/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_2.c deleted file mode 100644 index 735f123011..0000000000 --- a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_2.c +++ /dev/null @@ -1,105 +0,0 @@ -#include <stdio.h> -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - -int print_queue_empty; - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn_2(struct print_job_info *pji) -{ - print_queue_empty = 0; - g_print_id = pji->id; -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - print_queue_empty = 0; - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - - while ( ! print_queue_empty ) /* Wait until the queue is empty */ - { - sleep(1); - print_queue_empty = 1; - smbc_list_print_jobs(url,print_list_fn_2); - } - - err = smbc_list_print_jobs(url,print_list_fn); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_3.c b/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_3.c deleted file mode 100644 index a3b1cd224a..0000000000 --- a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_3.c +++ /dev/null @@ -1,103 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - smbc_print_file(url,argv[6]); - err = smbc_list_print_jobs(argv[6],print_list_fn); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_4.c b/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_4.c deleted file mode 100644 index 1501287693..0000000000 --- a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_4.c +++ /dev/null @@ -1,99 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - smbc_print_file(url,argv[6]); - err = smbc_list_print_jobs(argv[6],print_list_fn); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_5.c b/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_5.c deleted file mode 100644 index 774873699e..0000000000 --- a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_5.c +++ /dev/null @@ -1,101 +0,0 @@ -#include <stdio.h> -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - -int print_queue_empty; - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn_2(struct print_job_info *pji) -{ - print_queue_empty = 0; - g_print_id = pji->id; -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - print_queue_empty = 0; - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - - while ( ! print_queue_empty ) /* Wait until the queue is empty */ - { - sleep(1); - print_queue_empty = 1; - smbc_list_print_jobs(url,print_list_fn_2); - } - - smbc_list_print_jobs(url,print_list_fn); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_6.c b/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_6.c deleted file mode 100644 index 00bbf4d3b9..0000000000 --- a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_6.c +++ /dev/null @@ -1,110 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - -int print_fn_call_flag; - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - - - print_fn_call_flag = 1; - -} - -int main(int argc, char** argv) -{ - - int err = -1; - int fd = 0; - int msg_len = 0; - char * message; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - print_fn_call_flag = 0; - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - smbc_print_file(url,argv[6]); - smbc_list_print_jobs(url,print_list_fn); - - if ( print_fn_call_flag == 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_7.c b/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_7.c deleted file mode 100644 index e6ebf4cc20..0000000000 --- a/testsuite/libsmbclient/src/list_print_jobs/list_print_jobs_7.c +++ /dev/null @@ -1,106 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - - smbc_print_file(url,argv[6]); - smbc_list_print_jobs(argv[6],print_list_fn); - - - if (( (g_print_size > 0) && (g_print_size > 0) && (strcasecmp(g_username,g_print_user)==0) )) - /* && (strlen(g_print_name) > 0) )) */ - err = 0; - - else - err = 1; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseek/lseek_1.c b/testsuite/libsmbclient/src/lseek/lseek_1.c deleted file mode 100644 index b6a6a535b6..0000000000 --- a/testsuite/libsmbclient/src/lseek/lseek_1.c +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - - if ( argc == 4 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - - smbc_init(auth_fn, 0); - - fd = -1; - err = smbc_lseek(fd, 0, SEEK_SET); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseek/lseek_2.c b/testsuite/libsmbclient/src/lseek/lseek_2.c deleted file mode 100644 index e6179ebc9c..0000000000 --- a/testsuite/libsmbclient/src/lseek/lseek_2.c +++ /dev/null @@ -1,57 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - - if ( argc == 4 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - - smbc_init(auth_fn, 0); - - fd = -1; - smbc_lseek(fd, 0, SEEK_SET); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseek/lseek_3.c b/testsuite/libsmbclient/src/lseek/lseek_3.c deleted file mode 100644 index 1d25337dc4..0000000000 --- a/testsuite/libsmbclient/src/lseek/lseek_3.c +++ /dev/null @@ -1,80 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - err = smbc_lseek(fd,msg_len,SEEK_SET); - smbc_close(fd); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - free(message); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseek/lseek_4.c b/testsuite/libsmbclient/src/lseek/lseek_4.c deleted file mode 100644 index 1d25337dc4..0000000000 --- a/testsuite/libsmbclient/src/lseek/lseek_4.c +++ /dev/null @@ -1,80 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - err = smbc_lseek(fd,msg_len,SEEK_SET); - smbc_close(fd); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - free(message); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseek/lseek_5.c b/testsuite/libsmbclient/src/lseek/lseek_5.c deleted file mode 100644 index dcd9e7dcc1..0000000000 --- a/testsuite/libsmbclient/src/lseek/lseek_5.c +++ /dev/null @@ -1,80 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - err = smbc_lseek(fd,msg_len,SEEK_SET); - smbc_close(fd); - - if ( err != msg_len ) - err = 1; - - else - err = 0; - - free(message); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseek/lseek_6.c b/testsuite/libsmbclient/src/lseek/lseek_6.c deleted file mode 100644 index 776742dece..0000000000 --- a/testsuite/libsmbclient/src/lseek/lseek_6.c +++ /dev/null @@ -1,75 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - err = smbc_lseek(fd,msg_len,SEEK_SET); - err = errno; - smbc_close(fd); - - free(message); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseek/lseek_7.c b/testsuite/libsmbclient/src/lseek/lseek_7.c deleted file mode 100644 index 30cfa58805..0000000000 --- a/testsuite/libsmbclient/src/lseek/lseek_7.c +++ /dev/null @@ -1,80 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - err = smbc_lseek(fd,0,SEEK_END); - smbc_close(fd); - - if ( err != msg_len ) - err = 1; - - else - err = 0; - - free(message); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseek/lseek_8.c b/testsuite/libsmbclient/src/lseek/lseek_8.c deleted file mode 100644 index d778dcb578..0000000000 --- a/testsuite/libsmbclient/src/lseek/lseek_8.c +++ /dev/null @@ -1,75 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - err = smbc_lseek(fd,0,SEEK_END); - err = errno; - smbc_close(fd); - - free(message); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseekdir/lseekdir_1.c b/testsuite/libsmbclient/src/lseekdir/lseekdir_1.c deleted file mode 100644 index decf347159..0000000000 --- a/testsuite/libsmbclient/src/lseekdir/lseekdir_1.c +++ /dev/null @@ -1,102 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - char *file_name; - char *tmp_file_ptr; - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - err = smbc_lseekdir(dh,0); - /* printf("err: %i\n",err); */ - - if ( err < 0 ) - - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseekdir/lseekdir_2.c b/testsuite/libsmbclient/src/lseekdir/lseekdir_2.c deleted file mode 100644 index 2c3f448530..0000000000 --- a/testsuite/libsmbclient/src/lseekdir/lseekdir_2.c +++ /dev/null @@ -1,95 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - char *file_name; - char *tmp_file_ptr; - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - smbc_lseekdir(dh,0); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseekdir/lseekdir_3.c b/testsuite/libsmbclient/src/lseekdir/lseekdir_3.c deleted file mode 100644 index 86cadc76a8..0000000000 --- a/testsuite/libsmbclient/src/lseekdir/lseekdir_3.c +++ /dev/null @@ -1,67 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - err = smbc_lseekdir(dh,0); - /* printf("err: %i\n",err); */ - - if ( err < 0 ) - - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseekdir/lseekdir_4.c b/testsuite/libsmbclient/src/lseekdir/lseekdir_4.c deleted file mode 100644 index 1a67b2071b..0000000000 --- a/testsuite/libsmbclient/src/lseekdir/lseekdir_4.c +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - smbc_lseekdir(dh,0); - err = errno; - /* printf("err: %i\n",err); */ - - - } - - return err; - -} diff --git a/testsuite/libsmbclient/src/lseekdir/lseekdir_5.c b/testsuite/libsmbclient/src/lseekdir/lseekdir_5.c deleted file mode 100644 index a6bfd01cc9..0000000000 --- a/testsuite/libsmbclient/src/lseekdir/lseekdir_5.c +++ /dev/null @@ -1,119 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - int dirsize = 0; - char *file_name; - char *tmp_file_ptr; - - struct smbc_dirent *dirptr; - - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - err = 0; - - while ( 1 ) - { - dirptr = smbc_readdir(dh); - - if ( dirptr == NULL ) - { - break; - } - - dirsize += dirptr->dirlen; - - } - - smbc_lseekdir(dh,0); - err = smbc_telldir(dh); - - if ( err != 0 ) - err = 1; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/lseekdir/lseekdir_6.c b/testsuite/libsmbclient/src/lseekdir/lseekdir_6.c deleted file mode 100644 index 50501d46e3..0000000000 --- a/testsuite/libsmbclient/src/lseekdir/lseekdir_6.c +++ /dev/null @@ -1,126 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - int offset = 0; - int dirsize = 0; - char *file_name; - char *tmp_file_ptr; - - struct smbc_dirent *dirptr; - - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - err = 0; - - while ( 1 ) - { - dirptr = smbc_readdir(dh); - - if ( dirptr == NULL ) - { - break; - } - - dirsize += dirptr->dirlen; - - } - - smbc_lseekdir(dh,0); /* move to front */ - smbc_lseekdir(dh,dirsize); /* move to end */ - offset = smbc_telldir(dh); - - if ( offset != dirsize ) - { -/* - printf("offset: %i dirsize: %i\n", offset, dirsize); -*/ - err = 1; - } - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/mkdir/mkdir_1.c b/testsuite/libsmbclient/src/mkdir/mkdir_1.c deleted file mode 100644 index 0c1dfe3ce9..0000000000 --- a/testsuite/libsmbclient/src/mkdir/mkdir_1.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - smbc_rmdir( url ); - err = smbc_mkdir( url, 0666 ); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/mkdir/mkdir_2.c b/testsuite/libsmbclient/src/mkdir/mkdir_2.c deleted file mode 100644 index 42fefa6734..0000000000 --- a/testsuite/libsmbclient/src/mkdir/mkdir_2.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - smbc_rmdir( url ); - smbc_mkdir( url, 0666 ); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/mkdir/mkdir_3.c b/testsuite/libsmbclient/src/mkdir/mkdir_3.c deleted file mode 100644 index fa8038748b..0000000000 --- a/testsuite/libsmbclient/src/mkdir/mkdir_3.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - smbc_rmdir( url ); - - smbc_mkdir( url, 0666 ); - smbc_mkdir( url, 0666 ); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/mkdir/mkdir_4.c b/testsuite/libsmbclient/src/mkdir/mkdir_4.c deleted file mode 100644 index 11cc51927a..0000000000 --- a/testsuite/libsmbclient/src/mkdir/mkdir_4.c +++ /dev/null @@ -1,62 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - smbc_rmdir( url ); - - smbc_mkdir( url, 0666 ); - err = smbc_mkdir( url, 0666 ); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/open/open_1.c b/testsuite/libsmbclient/src/open/open_1.c deleted file mode 100644 index 676188c4f5..0000000000 --- a/testsuite/libsmbclient/src/open/open_1.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - - if ( fd < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/open/open_2.c b/testsuite/libsmbclient/src/open/open_2.c deleted file mode 100644 index 05f30e96da..0000000000 --- a/testsuite/libsmbclient/src/open/open_2.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/open/open_3.c b/testsuite/libsmbclient/src/open/open_3.c deleted file mode 100644 index df4af7be00..0000000000 --- a/testsuite/libsmbclient/src/open/open_3.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR, 0666); - - if ( fd < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/open/open_4.c b/testsuite/libsmbclient/src/open/open_4.c deleted file mode 100644 index feb87b8fb7..0000000000 --- a/testsuite/libsmbclient/src/open/open_4.c +++ /dev/null @@ -1,63 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - smbc_close(fd); - fd = 0; - fd = smbc_open(url, O_RDWR, 0666); - - if ( fd < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/open/open_5.c b/testsuite/libsmbclient/src/open/open_5.c deleted file mode 100644 index 44867f3a35..0000000000 --- a/testsuite/libsmbclient/src/open/open_5.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - smbc_close(fd); - fd = smbc_open(url, O_RDWR, 0666); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/open_print_job/open_print_job_1.c b/testsuite/libsmbclient/src/open_print_job/open_print_job_1.c deleted file mode 100644 index d3c5d0002d..0000000000 --- a/testsuite/libsmbclient/src/open_print_job/open_print_job_1.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open_print_job(url); - - if ( fd < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/open_print_job/open_print_job_2.c b/testsuite/libsmbclient/src/open_print_job/open_print_job_2.c deleted file mode 100644 index 1e7d0f18f0..0000000000 --- a/testsuite/libsmbclient/src/open_print_job/open_print_job_2.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open_print_job(url); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/opendir/opendir_1.c b/testsuite/libsmbclient/src/opendir/opendir_1.c deleted file mode 100644 index 8d5a5ac67b..0000000000 --- a/testsuite/libsmbclient/src/opendir/opendir_1.c +++ /dev/null @@ -1,62 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - - if ( dh < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/opendir/opendir_2.c b/testsuite/libsmbclient/src/opendir/opendir_2.c deleted file mode 100644 index c9ff2fc535..0000000000 --- a/testsuite/libsmbclient/src/opendir/opendir_2.c +++ /dev/null @@ -1,55 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_opendir(url); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/opendir/opendir_3.c b/testsuite/libsmbclient/src/opendir/opendir_3.c deleted file mode 100644 index 149d8c04b0..0000000000 --- a/testsuite/libsmbclient/src/opendir/opendir_3.c +++ /dev/null @@ -1,65 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR|O_CREAT,0666); - smbc_close(fd); - - err = smbc_opendir(url); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/opendir/opendir_4.c b/testsuite/libsmbclient/src/opendir/opendir_4.c deleted file mode 100644 index b298c09bbd..0000000000 --- a/testsuite/libsmbclient/src/opendir/opendir_4.c +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR|O_CREAT,0666); - smbc_close(fd); - - smbc_opendir(url); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/print_file/print_file_1.c b/testsuite/libsmbclient/src/print_file/print_file_1.c deleted file mode 100644 index 9fb6d4e0da..0000000000 --- a/testsuite/libsmbclient/src/print_file/print_file_1.c +++ /dev/null @@ -1,76 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - err = smbc_print_file(url,argv[6]); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/print_file/print_file_2.c b/testsuite/libsmbclient/src/print_file/print_file_2.c deleted file mode 100644 index 9b4e41a65b..0000000000 --- a/testsuite/libsmbclient/src/print_file/print_file_2.c +++ /dev/null @@ -1,72 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - - smbc_print_file(url,argv[6]); - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/print_file/print_file_3.c b/testsuite/libsmbclient/src/print_file/print_file_3.c deleted file mode 100644 index 41de01c1cd..0000000000 --- a/testsuite/libsmbclient/src/print_file/print_file_3.c +++ /dev/null @@ -1,59 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - - char url[MAX_BUFF_SIZE]; - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - err = smbc_print_file(url,argv[6]); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} diff --git a/testsuite/libsmbclient/src/print_file/print_file_4.c b/testsuite/libsmbclient/src/print_file/print_file_4.c deleted file mode 100644 index 568c49f348..0000000000 --- a/testsuite/libsmbclient/src/print_file/print_file_4.c +++ /dev/null @@ -1,55 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - - char url[MAX_BUFF_SIZE]; - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_print_file(url,argv[6]); - - err = errno; - - } - - return err; - -} diff --git a/testsuite/libsmbclient/src/read/read_1.c b/testsuite/libsmbclient/src/read/read_1.c deleted file mode 100644 index c708619cd8..0000000000 --- a/testsuite/libsmbclient/src/read/read_1.c +++ /dev/null @@ -1,83 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url,O_RDWR, 0666); - err = smbc_read(fd,response,msg_len); - - free(message); - free(response); - - if ( err < 0 ) - err = 1; - - else if ( err != msg_len ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_10.c b/testsuite/libsmbclient/src/read/read_10.c deleted file mode 100644 index 883c3a6459..0000000000 --- a/testsuite/libsmbclient/src/read/read_10.c +++ /dev/null @@ -1,68 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message = NULL; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - msg_len = 10; - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - - err = errno; - - smbc_close(fd); - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_11.c b/testsuite/libsmbclient/src/read/read_11.c deleted file mode 100644 index f0609134ec..0000000000 --- a/testsuite/libsmbclient/src/read/read_11.c +++ /dev/null @@ -1,83 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url, O_RDONLY, 0666); - smbc_read(fd,response,msg_len); - smbc_close(fd); - - if ( memcmp ( message, response, msg_len) == 0 ) - err = 0; - - else - err = 1; - - free(message); - free(response); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_12.c b/testsuite/libsmbclient/src/read/read_12.c deleted file mode 100644 index c4ae1ef8f1..0000000000 --- a/testsuite/libsmbclient/src/read/read_12.c +++ /dev/null @@ -1,87 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - strncpy(g_username,"xxxxxxxx",8); - strncpy(g_password,"xxxxxxxx",8); - - fd = smbc_open(url, O_RDONLY, 0666); - - err = smbc_read(fd,response,msg_len); - smbc_close(fd); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - free(message); - free(response); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_13.c b/testsuite/libsmbclient/src/read/read_13.c deleted file mode 100644 index 2dbbb887ae..0000000000 --- a/testsuite/libsmbclient/src/read/read_13.c +++ /dev/null @@ -1,91 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - strncpy(g_username,"xxxxxxxx",8); - strncpy(g_password,"xxxxxxxx",8); - - fd = smbc_open(url, O_RDONLY, 0666); - - if (fd < 0) - - err = errno; - - else { - - err = smbc_read(fd,response,msg_len); - err = errno; - - smbc_close(fd); - - } - - free(message); - free(response); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_2.c b/testsuite/libsmbclient/src/read/read_2.c deleted file mode 100644 index 6eab5aff4f..0000000000 --- a/testsuite/libsmbclient/src/read/read_2.c +++ /dev/null @@ -1,76 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url,O_RDWR, 0666); - smbc_read(fd,response,msg_len); - err = errno; - - free(message); - free(response); - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_3.c b/testsuite/libsmbclient/src/read/read_3.c deleted file mode 100644 index 5c05097fc2..0000000000 --- a/testsuite/libsmbclient/src/read/read_3.c +++ /dev/null @@ -1,83 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url,O_WRONLY, 0666); - err = smbc_read(fd,response,msg_len); - - free(message); - free(response); - - if ( err < 0 ) - err = 1; - - else if ( err != msg_len ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_4.c b/testsuite/libsmbclient/src/read/read_4.c deleted file mode 100644 index 5620f43e44..0000000000 --- a/testsuite/libsmbclient/src/read/read_4.c +++ /dev/null @@ -1,77 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - memset(response, '\0', msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url,O_WRONLY, 0666); - smbc_read(fd,response,msg_len); - err = errno; - - free(message); - free(response); - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_5.c b/testsuite/libsmbclient/src/read/read_5.c deleted file mode 100644 index b9035b0171..0000000000 --- a/testsuite/libsmbclient/src/read/read_5.c +++ /dev/null @@ -1,83 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url,O_RDONLY, 0666); - err = smbc_read(fd,response,msg_len); - - free(message); - free(response); - - if ( err < 0 ) - err = 1; - - else if ( err != msg_len ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_6.c b/testsuite/libsmbclient/src/read/read_6.c deleted file mode 100644 index 25f4416ea4..0000000000 --- a/testsuite/libsmbclient/src/read/read_6.c +++ /dev/null @@ -1,77 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - memset(response, '\0', msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url,O_RDONLY, 0666); - smbc_read(fd,response,msg_len); - err = errno; - - free(message); - free(response); - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_7.c b/testsuite/libsmbclient/src/read/read_7.c deleted file mode 100644 index 4660c1e3b5..0000000000 --- a/testsuite/libsmbclient/src/read/read_7.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char* message = "Testing"; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - - if ( argc == 4 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - - fd = 10345; /* Random value for File Descriptor */ - smbc_init(auth_fn, 0); - err = smbc_read(fd, message, sizeof(message)); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_8.c b/testsuite/libsmbclient/src/read/read_8.c deleted file mode 100644 index d70a78ec34..0000000000 --- a/testsuite/libsmbclient/src/read/read_8.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char* message = "Testing"; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - - if ( argc == 4 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - - fd = 10345; /* Random value for File Descriptor */ - smbc_init(auth_fn, 0); - err = smbc_read(fd, message, sizeof(message)); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/read/read_9.c b/testsuite/libsmbclient/src/read/read_9.c deleted file mode 100644 index dc848b179b..0000000000 --- a/testsuite/libsmbclient/src/read/read_9.c +++ /dev/null @@ -1,70 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message = NULL; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - msg_len = 10; - fd = smbc_open(url, O_RDWR, 0666); - err = smbc_read(fd, message, msg_len); - smbc_close(fd); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/readdir/readdir_1.c b/testsuite/libsmbclient/src/readdir/readdir_1.c deleted file mode 100644 index fc0849ff3b..0000000000 --- a/testsuite/libsmbclient/src/readdir/readdir_1.c +++ /dev/null @@ -1,107 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - char *file_name; - char *tmp_file_ptr; - - struct smbc_dirent *dirptr; - - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - dirptr = smbc_readdir( dh ); - - if ( dirptr == NULL ) - - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/readdir/readdir_2.c b/testsuite/libsmbclient/src/readdir/readdir_2.c deleted file mode 100644 index 5c7658952f..0000000000 --- a/testsuite/libsmbclient/src/readdir/readdir_2.c +++ /dev/null @@ -1,102 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - char *file_name; - char *tmp_file_ptr; - - struct smbc_dirent *dirptr; - - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - dirptr = smbc_readdir( dh ); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/readdir/readdir_3.c b/testsuite/libsmbclient/src/readdir/readdir_3.c deleted file mode 100644 index 9854d73e59..0000000000 --- a/testsuite/libsmbclient/src/readdir/readdir_3.c +++ /dev/null @@ -1,71 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - - struct smbc_dirent *dirptr; - - - char url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - dh = smbc_opendir(url); - dirptr = smbc_readdir( dh ); - - if ( dirptr == NULL ) - - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/readdir/readdir_4.c b/testsuite/libsmbclient/src/readdir/readdir_4.c deleted file mode 100644 index b3c4151583..0000000000 --- a/testsuite/libsmbclient/src/readdir/readdir_4.c +++ /dev/null @@ -1,67 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - - struct smbc_dirent *dirptr; - - - char url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - - dh = smbc_opendir(url); - dirptr = smbc_readdir( dh ); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/readdir/readdir_5.c b/testsuite/libsmbclient/src/readdir/readdir_5.c deleted file mode 100644 index e648dda60d..0000000000 --- a/testsuite/libsmbclient/src/readdir/readdir_5.c +++ /dev/null @@ -1,155 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - int j = 0; - char *file_name; - char *tmp_file_ptr; - - struct smbc_dirent *dirptr; - - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - - err = 0; - i = 0; - memset(buff, '\0', MAX_BUFF_SIZE); - memset(tmp_file_ptr, '\0', MAX_BUFF_SIZE-9); - - while ( 1 ) - { - dirptr = smbc_readdir( dh ); - if ( dirptr == NULL ) - { - break; - } - - /* printf("Name: %s\n",dirptr->name); */ - if ( j == 0 ) - { - if ( !(( strncmp(dirptr->name,".",1) == 0 )) ) - { - break; - err = 1; - } - - } else if ( j == 1 ) { - - if ( !(( strncmp(dirptr->name,"..",2) == 0 )) ) - { - break; - err = 1; - } - - } else if ( j > 1 ) { - - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - - if ( !(( strcmp(dirptr->name,file_url) == 0 )) ) /* make sure entries match */ - { - err = 1; - break; - } - - i++; - - } - - j++; - - } - - if ( ! err ) - { - if ( (j - 2) != entry_num ) /* Make sure that all entries created are counted and returned - minus . and .. */ - err = 1; - } - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_1.c b/testsuite/libsmbclient/src/rename/rename_1.c deleted file mode 100644 index d2650f9615..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_1.c +++ /dev/null @@ -1,57 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - err = smbc_rename( url, argv[5] ); - - if ( err < 0 ) - err = 1; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_10.c b/testsuite/libsmbclient/src/rename/rename_10.c deleted file mode 100644 index 42e5b55138..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_10.c +++ /dev/null @@ -1,64 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 9 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[6], strlen(argv[6]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - smbc_mkdir( argv[7], 0700 ); - - strncpy( g_username, argv[4], strlen(argv[4]) ); - strncpy( g_password, argv[5], strlen(argv[5]) ); - - smbc_rename( url, argv[8] ); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_11.c b/testsuite/libsmbclient/src/rename/rename_11.c deleted file mode 100644 index e161fd35ec..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_11.c +++ /dev/null @@ -1,63 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - err = smbc_rename( NULL, url ); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_12.c b/testsuite/libsmbclient/src/rename/rename_12.c deleted file mode 100644 index b4e80c897f..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_12.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - smbc_rename( NULL, url ); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_13.c b/testsuite/libsmbclient/src/rename/rename_13.c deleted file mode 100644 index 46fa9e312f..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_13.c +++ /dev/null @@ -1,63 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - err = smbc_rename( url, NULL ); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_14.c b/testsuite/libsmbclient/src/rename/rename_14.c deleted file mode 100644 index 2ba64a56ce..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_14.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - smbc_rename( url, NULL ); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_2.c b/testsuite/libsmbclient/src/rename/rename_2.c deleted file mode 100644 index 5340577036..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_2.c +++ /dev/null @@ -1,54 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_rename( url, argv[5] ); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_3.c b/testsuite/libsmbclient/src/rename/rename_3.c deleted file mode 100644 index 84dc3b440a..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_3.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_open(url,O_RDWR | O_CREAT,0666); - err = smbc_rename( url, argv[5] ); - - if ( err < 0 ) - err = 1; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_4.c b/testsuite/libsmbclient/src/rename/rename_4.c deleted file mode 100644 index fc75fca14c..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_4.c +++ /dev/null @@ -1,55 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_open(url,O_RDWR | O_CREAT,0666); - smbc_rename( url, argv[5] ); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_5.c b/testsuite/libsmbclient/src/rename/rename_5.c deleted file mode 100644 index 58cc902905..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_5.c +++ /dev/null @@ -1,59 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - fd = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd ); - err = smbc_rename( url, argv[5] ); - - if ( err < 0 ) - err = 1; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_6.c b/testsuite/libsmbclient/src/rename/rename_6.c deleted file mode 100644 index 7ea2afc603..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_6.c +++ /dev/null @@ -1,57 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url,O_RDWR | O_CREAT,0666); - smbc_close( fd ); - smbc_rename( url, argv[5] ); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_7.c b/testsuite/libsmbclient/src/rename/rename_7.c deleted file mode 100644 index 773cb6926d..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_7.c +++ /dev/null @@ -1,66 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - int fd2 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - smbc_rename( url, argv[5] ); - fd1 = smbc_open( url, O_RDWR, 0666 ); - fd2 = smbc_open( argv[5], O_RDWR, 0666 ); - - if ( fd1 == -1 && fd2 != -1 ) - err = 0; - - else - err = 1; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_8.c b/testsuite/libsmbclient/src/rename/rename_8.c deleted file mode 100644 index 6a44d9fb63..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_8.c +++ /dev/null @@ -1,68 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - int fd2 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 7 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - smbc_mkdir( argv[5], 0666 ); - smbc_rename( url, argv[6] ); - - fd1 = smbc_open( url, O_RDWR, 0666 ); - fd2 = smbc_open( argv[6], O_RDWR, 0666 ); - - if ( fd1 == -1 && fd2 != -1 ) - err = 0; - - else - err = 1; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rename/rename_9.c b/testsuite/libsmbclient/src/rename/rename_9.c deleted file mode 100644 index 3f0386db00..0000000000 --- a/testsuite/libsmbclient/src/rename/rename_9.c +++ /dev/null @@ -1,68 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 9 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[6], strlen(argv[6]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - smbc_mkdir( argv[7], 0700 ); - - strncpy( g_username, argv[4], strlen(argv[4]) ); - strncpy( g_password, argv[5], strlen(argv[5]) ); - - err = smbc_rename( url, argv[8] ); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rmdir/rmdir_1.c b/testsuite/libsmbclient/src/rmdir/rmdir_1.c deleted file mode 100644 index 09717d1269..0000000000 --- a/testsuite/libsmbclient/src/rmdir/rmdir_1.c +++ /dev/null @@ -1,59 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - err = smbc_rmdir( url ); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rmdir/rmdir_2.c b/testsuite/libsmbclient/src/rmdir/rmdir_2.c deleted file mode 100644 index bc9b0189ea..0000000000 --- a/testsuite/libsmbclient/src/rmdir/rmdir_2.c +++ /dev/null @@ -1,55 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - smbc_rmdir( url ); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rmdir/rmdir_3.c b/testsuite/libsmbclient/src/rmdir/rmdir_3.c deleted file mode 100644 index bab003378d..0000000000 --- a/testsuite/libsmbclient/src/rmdir/rmdir_3.c +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - smbc_mkdir( url, 700 ); - - err = smbc_rmdir( url ); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rmdir/rmdir_4.c b/testsuite/libsmbclient/src/rmdir/rmdir_4.c deleted file mode 100644 index 48699a3b8c..0000000000 --- a/testsuite/libsmbclient/src/rmdir/rmdir_4.c +++ /dev/null @@ -1,57 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - smbc_mkdir( url, 700 ); - - smbc_rmdir( url ); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rmdir/rmdir_5.c b/testsuite/libsmbclient/src/rmdir/rmdir_5.c deleted file mode 100644 index 092c51a14a..0000000000 --- a/testsuite/libsmbclient/src/rmdir/rmdir_5.c +++ /dev/null @@ -1,63 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - err = smbc_rmdir( url ); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/rmdir/rmdir_6.c b/testsuite/libsmbclient/src/rmdir/rmdir_6.c deleted file mode 100644 index e021c24d2a..0000000000 --- a/testsuite/libsmbclient/src/rmdir/rmdir_6.c +++ /dev/null @@ -1,59 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd1 = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - strncpy( g_workgroup, argv[1], strlen(argv[1]) ); - strncpy( g_username, argv[2], strlen(argv[2]) ); - strncpy( g_password, argv[3], strlen(argv[3]) ); - strncpy( url, argv[4], strlen(argv[4]) ); - - smbc_init( auth_fn, 0 ); - fd1 = smbc_open( url, O_RDWR | O_CREAT, 0666 ); - smbc_close( fd1 ); - - smbc_rmdir( url ); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/stat/stat_1.c b/testsuite/libsmbclient/src/stat/stat_1.c deleted file mode 100644 index 6a7d61f422..0000000000 --- a/testsuite/libsmbclient/src/stat/stat_1.c +++ /dev/null @@ -1,62 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - err = smbc_stat(url, &st); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/stat/stat_2.c b/testsuite/libsmbclient/src/stat/stat_2.c deleted file mode 100644 index c12048def4..0000000000 --- a/testsuite/libsmbclient/src/stat/stat_2.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_stat(url, &st); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/stat/stat_3.c b/testsuite/libsmbclient/src/stat/stat_3.c deleted file mode 100644 index ee14f3232b..0000000000 --- a/testsuite/libsmbclient/src/stat/stat_3.c +++ /dev/null @@ -1,66 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - err = smbc_stat(url, &st); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/stat/stat_4.c b/testsuite/libsmbclient/src/stat/stat_4.c deleted file mode 100644 index 4aa751032b..0000000000 --- a/testsuite/libsmbclient/src/stat/stat_4.c +++ /dev/null @@ -1,62 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - smbc_stat(url, &st); - - err = errno; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/stat/stat_5.c b/testsuite/libsmbclient/src/stat/stat_5.c deleted file mode 100644 index cef0913bad..0000000000 --- a/testsuite/libsmbclient/src/stat/stat_5.c +++ /dev/null @@ -1,77 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - smbc_stat(url,&st); - - free(message); - - if ( st.st_size != msg_len ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/stat/stat_6.c b/testsuite/libsmbclient/src/stat/stat_6.c deleted file mode 100644 index b765c8c293..0000000000 --- a/testsuite/libsmbclient/src/stat/stat_6.c +++ /dev/null @@ -1,80 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - unsigned int mode_mask = 0; - char url[MAX_BUFF_SIZE]; - char* message; - struct stat st; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - smbc_stat(url,&st); - - free(message); - - mode_mask = mode_mask | S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; /* 0666 or 33206 */ - - if ( st.st_mode != mode_mask ) - err = 1; - - else - err = 0; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/stat/stat_k.c b/testsuite/libsmbclient/src/stat/stat_k.c deleted file mode 100644 index d67195cfd3..0000000000 --- a/testsuite/libsmbclient/src/stat/stat_k.c +++ /dev/null @@ -1,91 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <unistd.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - struct stat st; - char *user; - SMBCCTX *ctx; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 2) - { - char *p; - user = getenv("USER"); - if (!user) { - printf("no user??\n"); - return 0; - } - - printf("username: %s\n", user); - - p = strchr(user, '\\'); - if (! p) { - printf("BAD username??\n"); - return 0; - } - strncpy(g_workgroup, user, strlen(user)); - g_workgroup[p - user] = 0; - strncpy(g_username, p + 1, strlen(p + 1)); - memset(g_password, 0, sizeof(char) * MAX_BUFF_SIZE); - strncpy(url,argv[1],strlen(argv[1])); - - err = smbc_init(auth_fn, 10); - if (err) { - printf("init smbclient context failed!!\n"); - return err; - } - /* Using null context actually get the old context. */ - ctx = smbc_set_context(NULL); - smbc_setOptionUseKerberos(ctx, 1); - smbc_setOptionFallbackAfterKerberos(ctx, 1); - smbc_setWorkgroup(ctx, g_workgroup); - smbc_setUser(ctx, g_username); - err = smbc_stat(url, &st); - - if ( err < 0 ) { - err = 1; - printf("stat failed!!\n"); - } - else { - err = 0; - printf("stat succeeded!!\n"); - } - - - } - - return err; - -} diff --git a/testsuite/libsmbclient/src/telldir/telldir_1.c b/testsuite/libsmbclient/src/telldir/telldir_1.c deleted file mode 100644 index 8bba7b0680..0000000000 --- a/testsuite/libsmbclient/src/telldir/telldir_1.c +++ /dev/null @@ -1,102 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - char *file_name; - char *tmp_file_ptr; - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - err = smbc_telldir(dh); - /* printf("err: %i\n",err); */ - - if ( err < 0 ) - - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/telldir/telldir_2.c b/testsuite/libsmbclient/src/telldir/telldir_2.c deleted file mode 100644 index 3f9a24dc9c..0000000000 --- a/testsuite/libsmbclient/src/telldir/telldir_2.c +++ /dev/null @@ -1,95 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - char *file_name; - char *tmp_file_ptr; - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - smbc_telldir(dh); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/telldir/telldir_3.c b/testsuite/libsmbclient/src/telldir/telldir_3.c deleted file mode 100644 index 937d9a61ad..0000000000 --- a/testsuite/libsmbclient/src/telldir/telldir_3.c +++ /dev/null @@ -1,67 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - err = smbc_telldir(dh); - /* printf("err: %i\n",err); */ - - if ( err < 0 ) - - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/telldir/telldir_4.c b/testsuite/libsmbclient/src/telldir/telldir_4.c deleted file mode 100644 index caef669ba7..0000000000 --- a/testsuite/libsmbclient/src/telldir/telldir_4.c +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int dh = 0; - - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - - dh = smbc_opendir(url); - /* printf("directory handle: %i\n",dh); */ - smbc_telldir(dh); - err = errno; - /* printf("err: %i\n",err); */ - - - } - - return err; - -} diff --git a/testsuite/libsmbclient/src/telldir/telldir_5.c b/testsuite/libsmbclient/src/telldir/telldir_5.c deleted file mode 100644 index 2b9306270e..0000000000 --- a/testsuite/libsmbclient/src/telldir/telldir_5.c +++ /dev/null @@ -1,124 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int dh = 0; - int entry_num = 0; - int i = 0; - int offset = 0; - int dirsize = 0; - char *file_name; - char *tmp_file_ptr; - - struct smbc_dirent *dirptr; - - - char buff[MAX_BUFF_SIZE]; - char url[MAX_BUFF_SIZE]; - char file_url[MAX_BUFF_SIZE]; - char dir_url[MAX_BUFF_SIZE]; - char dirbuff[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(file_url, '\0', MAX_BUFF_SIZE); - memset(dir_url, '\0', MAX_BUFF_SIZE); - memset(buff, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - dirptr = (struct smbc_dirent *) dirbuff; - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - smbc_init(auth_fn, 0); - - strncpy(file_url,"tempfile-",9); - tmp_file_ptr = file_url; - tmp_file_ptr += 9; - - smbc_rmdir(url); - smbc_mkdir(url,0666); - - entry_num = atoi(argv[5]); - strcat(dir_url,url); - strcat(dir_url,"/"); - - file_name = dir_url; - file_name += strlen(dir_url); - - for ( i = 0; i < entry_num; i++ ) - { - sprintf(buff,"%d",i); - memcpy(tmp_file_ptr,buff,strlen(buff)+4); - strncat(tmp_file_ptr,".txt",4); - strcpy(file_name,file_url); - fd = smbc_open(dir_url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - } - - dh = smbc_opendir(url); - err = 0; - - while ( 1 ) - { - dirptr = smbc_readdir(dh); - - if ( dirptr == NULL ) - { - break; - } - - dirsize += dirptr->dirlen; - - } - - offset = smbc_telldir(dh); - - if ( offset != dirsize ) - { -/* - printf("offset: %i dirsize: %i\n", offset, dirsize); -*/ - err = 1; - } - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_1.c b/testsuite/libsmbclient/src/unlink/unlink_1.c deleted file mode 100644 index 119f06b8cf..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_1.c +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - err = smbc_unlink(url); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_10.c b/testsuite/libsmbclient/src/unlink/unlink_10.c deleted file mode 100644 index b5c5200934..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_10.c +++ /dev/null @@ -1,62 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0000); - smbc_close(fd); - - strncpy(g_username, "xxxxxx", 6); - strncpy(g_password, "xxxxxx", 6); - - smbc_unlink(url); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_11.c b/testsuite/libsmbclient/src/unlink/unlink_11.c deleted file mode 100644 index dc9ee676c5..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_11.c +++ /dev/null @@ -1,66 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0000); - smbc_close(fd); - - strncpy(g_username, "xxxxxx", 6); - strncpy(g_password, "xxxxxx", 6); - - err = smbc_unlink(url); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_12.c b/testsuite/libsmbclient/src/unlink/unlink_12.c deleted file mode 100644 index 3851dc75c9..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_12.c +++ /dev/null @@ -1,65 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - smbc_unlink(url); - - fd = smbc_open(url, O_RDWR, 0666); - - if ( fd < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_2.c b/testsuite/libsmbclient/src/unlink/unlink_2.c deleted file mode 100644 index deeb89fd9c..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_2.c +++ /dev/null @@ -1,61 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_mkdir(url, 0666); - err = smbc_unlink(url); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_3.c b/testsuite/libsmbclient/src/unlink/unlink_3.c deleted file mode 100644 index b102b4310e..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_3.c +++ /dev/null @@ -1,57 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_mkdir(url, 0666); - smbc_unlink(url); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_4.c b/testsuite/libsmbclient/src/unlink/unlink_4.c deleted file mode 100644 index cb100afcd4..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_4.c +++ /dev/null @@ -1,64 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[6],strlen(argv[6])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - strncpy(g_username,argv[4],strlen(argv[4])); - strncpy(g_password,argv[5],strlen(argv[5])); - - err = smbc_unlink(url); - - if ( err < 0 ) - err = 1; - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_5.c b/testsuite/libsmbclient/src/unlink/unlink_5.c deleted file mode 100644 index c3e89bddd6..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_5.c +++ /dev/null @@ -1,62 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - smbc_close(fd); - err = smbc_unlink(url); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_6.c b/testsuite/libsmbclient/src/unlink/unlink_6.c deleted file mode 100644 index a048bdd6b0..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_6.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - smbc_close(fd); - smbc_unlink(url); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_7.c b/testsuite/libsmbclient/src/unlink/unlink_7.c deleted file mode 100644 index 0e7c6f5581..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_7.c +++ /dev/null @@ -1,62 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[6],strlen(argv[6])); - - smbc_init(auth_fn, 0); - fd = smbc_open(url, O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - strncpy(g_username,argv[4],strlen(argv[4])); - strncpy(g_password,argv[5],strlen(argv[5])); - - smbc_unlink(url); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_8.c b/testsuite/libsmbclient/src/unlink/unlink_8.c deleted file mode 100644 index 112af5588a..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_8.c +++ /dev/null @@ -1,55 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink/unlink_9.c b/testsuite/libsmbclient/src/unlink/unlink_9.c deleted file mode 100644 index 04af8d9f1e..0000000000 --- a/testsuite/libsmbclient/src/unlink/unlink_9.c +++ /dev/null @@ -1,57 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - char url[MAX_BUFF_SIZE]; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - err = smbc_unlink(url); - - if ( err < 0 ) - err = 1; - - - } - - return 1; - -} - diff --git a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_1.c b/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_1.c deleted file mode 100644 index 2741829ecd..0000000000 --- a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_1.c +++ /dev/null @@ -1,107 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - smbc_print_file(url,argv[6]); - smbc_list_print_jobs(argv[6],print_list_fn); - - g_print_id = -1; - err = smbc_unlink_print_job(argv[6],g_print_id); - - if ( err < 0 ) - - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_2.c b/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_2.c deleted file mode 100644 index 0a9cdb4617..0000000000 --- a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_2.c +++ /dev/null @@ -1,102 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - smbc_print_file(url,argv[6]); - smbc_list_print_jobs(argv[6],print_list_fn); - - g_print_id = -1; - smbc_unlink_print_job(argv[6],g_print_id); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_3.c b/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_3.c deleted file mode 100644 index feac086912..0000000000 --- a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_3.c +++ /dev/null @@ -1,106 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - smbc_print_file(url,argv[6]); - smbc_list_print_jobs(argv[6],print_list_fn); - - err = smbc_unlink_print_job(argv[6],g_print_id); - - if ( err < 0 ) - - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_4.c b/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_4.c deleted file mode 100644 index ff73be9d99..0000000000 --- a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_4.c +++ /dev/null @@ -1,101 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - smbc_print_file(url,argv[6]); - smbc_list_print_jobs(argv[6],print_list_fn); - - smbc_unlink_print_job(argv[6],g_print_id); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_5.c b/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_5.c deleted file mode 100644 index b2231f799b..0000000000 --- a/testsuite/libsmbclient/src/unlink_print_job/unlink_print_job_5.c +++ /dev/null @@ -1,141 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - -char g_print_user[MAX_BUFF_SIZE]; -char g_print_name[MAX_BUFF_SIZE]; -unsigned int g_print_id; -unsigned int g_print_priority; -unsigned int g_print_size; - -unsigned int print_ids[MAX_BUFF_SIZE]; -unsigned int print_id_count; -int call_flag; - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -static void print_list_fn_2(struct print_job_info *pji) -{ - - print_ids[print_id_count] = pji->id; - print_id_count++; - - /* fprintf(stdout, "Call to Second Print Function - Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -static void print_list_fn(struct print_job_info *pji) -{ - - g_print_id = pji->id; - g_print_priority = pji->priority; - g_print_size = pji->size; - strcpy(g_print_user,pji->user); - strcpy(g_print_name,pji->name); - - /* fprintf(stdout, "Call to First Print Function - Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", - pji->id, pji->priority, pji->size, pji->user, pji->name); */ - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - unsigned int i = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - memset(g_print_user, '\0', MAX_BUFF_SIZE); - memset(g_print_name, '\0', MAX_BUFF_SIZE); - - g_print_id = 0; - g_print_priority = 0; - g_print_size = 0; - - print_id_count = 0; - - if ( argc == 7 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - /* printf("Message: %s\n",message); */ - /* printf("Message len: %i\n",msg_len); */ - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - - smbc_print_file(url,argv[6]); - smbc_print_file(url,argv[6]); - smbc_print_file(url,argv[6]); - - smbc_list_print_jobs(argv[6],print_list_fn); - - if ( smbc_unlink_print_job(argv[6],g_print_id) == 0 ) - { - if ( smbc_list_print_jobs(argv[6],print_list_fn_2) == 0 ) - { - err = 0; - - for ( i=0; i<print_id_count; i++ ) - { - if ( g_print_id == print_ids[i] ) - { - err = 1; - break; - } - - } - } - - } else - err = 1; - - - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_1.c b/testsuite/libsmbclient/src/write/write_1.c deleted file mode 100644 index b3631a02fe..0000000000 --- a/testsuite/libsmbclient/src/write/write_1.c +++ /dev/null @@ -1,77 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - - err = smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - - if ( err < 0 ) - err = 1; - - else if ( err != msg_len ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_10.c b/testsuite/libsmbclient/src/write/write_10.c deleted file mode 100644 index 65970982d2..0000000000 --- a/testsuite/libsmbclient/src/write/write_10.c +++ /dev/null @@ -1,70 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message = NULL; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - msg_len = 10; - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - - err = errno; - - smbc_close(fd); - - free(message); - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_11.c b/testsuite/libsmbclient/src/write/write_11.c deleted file mode 100644 index f0609134ec..0000000000 --- a/testsuite/libsmbclient/src/write/write_11.c +++ /dev/null @@ -1,83 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDWR, 0666); - smbc_write(fd, message, msg_len); - smbc_close(fd); - - fd = smbc_open(url, O_RDONLY, 0666); - smbc_read(fd,response,msg_len); - smbc_close(fd); - - if ( memcmp ( message, response, msg_len) == 0 ) - err = 0; - - else - err = 1; - - free(message); - free(response); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_12.c b/testsuite/libsmbclient/src/write/write_12.c deleted file mode 100644 index b45bc26e60..0000000000 --- a/testsuite/libsmbclient/src/write/write_12.c +++ /dev/null @@ -1,83 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - strncpy(g_username,"xxxxxxxx",8); - strncpy(g_password,"xxxxxxxx",8); - - fd = smbc_open(url, O_RDWR, 0666); - - err = smbc_write(fd, message, msg_len); - smbc_close(fd); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - free(message); - free(response); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_13.c b/testsuite/libsmbclient/src/write/write_13.c deleted file mode 100644 index 9e63528485..0000000000 --- a/testsuite/libsmbclient/src/write/write_13.c +++ /dev/null @@ -1,87 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - char* response; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - response = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - strncpy(g_username,"xxxxxxxx",8); - strncpy(g_password,"xxxxxxxx",8); - - fd = smbc_open(url, O_RDWR, 0666); - - if (fd < 0) - - err = errno; - - else { - - smbc_write(fd, message, msg_len); - err = errno; - - smbc_close(fd); - - } - - free(message); - free(response); - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_2.c b/testsuite/libsmbclient/src/write/write_2.c deleted file mode 100644 index c9861d8e5c..0000000000 --- a/testsuite/libsmbclient/src/write/write_2.c +++ /dev/null @@ -1,71 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - - smbc_write(fd, message, msg_len); - err = errno; - - smbc_close(fd); - - free(message); - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_3.c b/testsuite/libsmbclient/src/write/write_3.c deleted file mode 100644 index 1948bbdf64..0000000000 --- a/testsuite/libsmbclient/src/write/write_3.c +++ /dev/null @@ -1,79 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDONLY, 0666); - err = smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - - if ( err < 0 ) - err = 1; - - else if ( err != msg_len ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_4.c b/testsuite/libsmbclient/src/write/write_4.c deleted file mode 100644 index be1b13bdc8..0000000000 --- a/testsuite/libsmbclient/src/write/write_4.c +++ /dev/null @@ -1,74 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_RDONLY, 0666); - - smbc_write(fd, message, msg_len); - err = errno; - - smbc_close(fd); - - free(message); - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_5.c b/testsuite/libsmbclient/src/write/write_5.c deleted file mode 100644 index eb85445b50..0000000000 --- a/testsuite/libsmbclient/src/write/write_5.c +++ /dev/null @@ -1,79 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_WRONLY, 0666); - err = smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - - if ( err < 0 ) - err = 1; - - else if ( err != msg_len ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_6.c b/testsuite/libsmbclient/src/write/write_6.c deleted file mode 100644 index 29db98ccbe..0000000000 --- a/testsuite/libsmbclient/src/write/write_6.c +++ /dev/null @@ -1,74 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 6 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - msg_len = strlen(argv[5])+1; - message = malloc(msg_len); - message[msg_len - 1] = 0; - strncpy(message,argv[5],msg_len); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - fd = smbc_open(url, O_WRONLY, 0666); - - smbc_write(fd, message, msg_len); - err = errno; - - smbc_close(fd); - - free(message); - - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_7.c b/testsuite/libsmbclient/src/write/write_7.c deleted file mode 100644 index 1c581823ad..0000000000 --- a/testsuite/libsmbclient/src/write/write_7.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char* message = "Testing"; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - - if ( argc == 4 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - - fd = 10345; /* Random value for File Descriptor */ - smbc_init(auth_fn, 0); - err = smbc_write(fd, message, sizeof(message)); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_8.c b/testsuite/libsmbclient/src/write/write_8.c deleted file mode 100644 index b660e76e97..0000000000 --- a/testsuite/libsmbclient/src/write/write_8.c +++ /dev/null @@ -1,56 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - char* message = "Testing"; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - - if ( argc == 4 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - - fd = 10345; /* Random value for File Descriptor */ - smbc_init(auth_fn, 0); - err = smbc_write(fd, message, sizeof(message)); - - err = errno; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/write/write_9.c b/testsuite/libsmbclient/src/write/write_9.c deleted file mode 100644 index 52e9f186e5..0000000000 --- a/testsuite/libsmbclient/src/write/write_9.c +++ /dev/null @@ -1,72 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <libsmbclient.h> - -#define MAX_BUFF_SIZE 255 -char g_workgroup[MAX_BUFF_SIZE]; -char g_username[MAX_BUFF_SIZE]; -char g_password[MAX_BUFF_SIZE]; -char g_server[MAX_BUFF_SIZE]; -char g_share[MAX_BUFF_SIZE]; - - -static void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, - char *username, int unmaxlen, char *password, int pwmaxlen) -{ - - strncpy(workgroup, g_workgroup, wgmaxlen - 1); - - strncpy(username, g_username, unmaxlen - 1); - - strncpy(password, g_password, pwmaxlen - 1); - - strcpy(g_server, server); - strcpy(g_share, share); - -} - -int main(int argc, char** argv) -{ - int err = -1; - int fd = 0; - int msg_len = 0; - char url[MAX_BUFF_SIZE]; - char* message = NULL; - - memset(g_workgroup, '\0', MAX_BUFF_SIZE); - memset(url, '\0', MAX_BUFF_SIZE); - - if ( argc == 5 ) - { - - strncpy(g_workgroup,argv[1],strlen(argv[1])); - strncpy(g_username,argv[2],strlen(argv[2])); - strncpy(g_password,argv[3],strlen(argv[3])); - strncpy(url,argv[4],strlen(argv[4])); - - smbc_init(auth_fn, 0); - smbc_unlink(url); - fd = smbc_open(url,O_RDWR | O_CREAT, 0666); - smbc_close(fd); - - msg_len = 10; - fd = smbc_open(url, O_RDWR, 0666); - err = smbc_write(fd, message, msg_len); - smbc_close(fd); - - free(message); - - if ( err < 0 ) - err = 1; - - else - err = 0; - - } - - return err; - -} - diff --git a/testsuite/libsmbclient/src/wscript_build b/testsuite/libsmbclient/src/wscript_build deleted file mode 100644 index 8e732d731f..0000000000 --- a/testsuite/libsmbclient/src/wscript_build +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/env python -names = [ ("init", range(1, 4)), - ("fstat", range(1, 6)), - ("open", range(1, 5)), - ("unlink", range(1, 12)), - ("chown", range(1)), - ("close", range(1,2)), - ("opendir", range(1, 4)), - ("closedir", range(1, 4)), - ("rename", range(1, 14)), - ("lseek", range(1, 8)), - ("lseekdir", range(1, 6)), - ("stat", range(1, 6)), - ("getdents", range(1, 5)), - ("creat", range(1, 3)), - ("mkdir", range(1, 4)), - ("readdir", range(1, 5)), - ("rmdir", range(1, 6)), - ("write", range(1, 13)), - ("read", range(1, 13)), - ("chmod", range(1)), - ("telldir", range(1, 5)), - ("print_file", range(1, 4)), - ("open_print_job", range(1, 2)), - ("list_print_jobs", range(1, 7)), - ("unlink_print_job", range(1, 5)) ] - -for pattern in names: - (name, suffixes) = pattern - for suffix in map(lambda x: x + 1, suffixes): - bld.SAMBA_BINARY('%s_%s' % (name, suffix), - source='%s/%s_%s.c' % (name, name, suffix), - deps='smbclient', - install=False) - -bld.SAMBA_BINARY('stat_k', - source='stat/stat_k.c', - deps='smbclient', - install=False) |