From: Thomas Walker Lynch Date: Sat, 23 Feb 2019 23:08:51 +0000 (+0100) Subject: after make clean X-Git-Url: https://git.reasoningtechnology.com/style/rt_dark_doc.css?a=commitdiff_plain;h=2a04fdb4d0380b5eea387891420fe63894081dcc;p=subu after make clean --- diff --git a/src/2_makefile_deps b/src/2_makefile_deps deleted file mode 100644 index 8bf3e2d..0000000 --- a/src/2_makefile_deps +++ /dev/null @@ -1,19 +0,0 @@ -common.lib.o: common.lib.c -dispatch_useradd.lib.o: dispatch_useradd.lib.c dispatch_useradd.lib.h -subu-mk-0.lib.o: subu-mk-0.lib.c subu-mk-0.lib.h -subu-config.lib.o: subu-config.lib.c subu-config.lib.h -dispatch_exec.lib.o: dispatch_exec.lib.c dispatch_exec.lib.h -dbprintf.lib.o: dbprintf.lib.c dbprintf.lib.h -dispatch_f.lib.o: dispatch_f.lib.c dispatch_f.lib.h -subu-number.cli.o: subu-number.cli.c subu-number.cli.h -subu-mk-0.cli.o: subu-mk-0.cli.c subu-mk-0.lib.h -subu-init.cli.o: subu-init.cli.c subu-init.cli.h - -subu-init : subu-init.cli.o . /libsubu.a - g++ -o subu-init subu-init.cli.o -L. -lsubu - -subu-mk-0 : subu-mk-0.cli.o . /libsubu.a - g++ -o subu-mk-0 subu-mk-0.cli.o -L. -lsubu - -subu-number : subu-number.cli.o . /libsubu.a - g++ -o subu-number subu-number.cli.o -L. -lsubu diff --git a/src/5_scratch/common.lib.h b/src/5_scratch/common.lib.h deleted file mode 100644 index 6b7f7c9..0000000 --- a/src/5_scratch/common.lib.h +++ /dev/null @@ -1,4 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -typedef unsigned int uint; -#define INTERFACE 0 diff --git a/src/5_scratch/dbprintf.lib.h b/src/5_scratch/dbprintf.lib.h deleted file mode 100644 index 3056cf6..0000000 --- a/src/5_scratch/dbprintf.lib.h +++ /dev/null @@ -1,3 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -int dbprintf(const char *format,...); diff --git a/src/5_scratch/dispatch_exec.lib.h b/src/5_scratch/dispatch_exec.lib.h deleted file mode 100644 index 877a38e..0000000 --- a/src/5_scratch/dispatch_exec.lib.h +++ /dev/null @@ -1,4 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -int dbprintf(const char *format,...); -int dispatch_exec(char **argv,char **envp); diff --git a/src/5_scratch/dispatch_f.lib.h b/src/5_scratch/dispatch_f.lib.h deleted file mode 100644 index 994592d..0000000 --- a/src/5_scratch/dispatch_f.lib.h +++ /dev/null @@ -1,5 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -int dispatch_f_euid_egid(char *fname,int(*f)(void *arg),void *f_arg,uid_t euid,gid_t egid); -int dbprintf(const char *format,...); -int dispatch_f(char *fname,int(*f)(void *arg),void *f_arg); diff --git a/src/5_scratch/dispatch_useradd.lib.h b/src/5_scratch/dispatch_useradd.lib.h deleted file mode 100644 index ce62797..0000000 --- a/src/5_scratch/dispatch_useradd.lib.h +++ /dev/null @@ -1,5 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -typedef unsigned int uint; -int dispatch_exec(char **argv,char **envp); -struct dispatch_useradd_ret_t dispatch_useradd(char **argv,char **envp); diff --git a/src/5_scratch/makefile b/src/5_scratch/makefile deleted file mode 100755 index 268cf34..0000000 --- a/src/5_scratch/makefile +++ /dev/null @@ -1,148 +0,0 @@ - -# a single space literal, for example if you wanted to subsitute commas to -# spaces: $(subst $(space),;,$(string)) we ran into this out of a need to send -# multiple separate command arguments to a shell script from one variable value -blank := -space :=$(blank) $(blank) - -# some versions of Linux need a -e option others complain if there is a -e .. and it isn't the binary for echo .. -ECHO= echo -#ECHO= echo -e - -SHELL=/bin/bash -SCRATCHDIR= 5_scratch # clean and others put things here -CC=gcc -CFLAGS="-std=c11 -fPIC -I. -ggdb -DDEBUG" -LIB="libsubu.a" -LIBPATH="." #no trailing slash -LINKFLAGS="-L. -lsubu" - -SOURCES_LIB= $(wildcard *.lib.c) -SOURCES_CLI= $(wildcard *.cli.c) -SOURCES= $(SOURCES_LIB) $(SOURCES_CLI) - -OBJECTS_LIB= $(patsubst %.c, %.o, $(SOURCES_LIB)) -OBJECTS_CLI= $(patsubst %.c, %.o, $(SOURCES_CLI)) -OBJECTS= $(OBJECTS_LIB) $(OBJECTS_CLI) - -# sort causes compiles to go in lexical order by file name, this is used to order the tests e.g. -EXECS= $(sort $(patsubst %.cli.c, %, $(wildcard *.cli.c))) - -version: - @echo '---- make $@:------------------------------------------------------------' - @echo `pwd`'>' - @echo makefile version 2.0 - @echo "CC: " $(CC) - @echo "CFLAGS: " $(CFLAGS) - @echo "LIB: " $(LIB) - @echo "LIBPATH: " $(LIBPATH) - @echo "LINKFLAGS: " $(LINKFLAGS) - @echo '______end make $@_____' - -# safe to run this in an already setup or partially setup directory -setup: - @echo '---- make $@:------------------------------------------------------------' - @echo `pwd`'>' - if [ ! -e $(SCRATCHDIR) ]; then mkdir $(SCRATCHDIR); fi - if [ ! -e 1_tests ]; then mkdir 1_tests; fi - if [ ! -e 1_try ]; then mkdir 1_try; fi - if [ ! -e 2_bin ]; then mkdir 2_bin; fi - if [ ! -e 3_documents ]; then mkdir 3_documents; fi - if [ ! -e 3_to_do.txt ]; then touch 3_to_do.txt; fi - if [ ! -e 5_deprecated ]; then mkdir 5_deprecated; fi - @echo '______end make $@_____' - - -deps: - @echo '---- make $@:------------------------------------------------------------' - @echo `pwd`'>' - $(CC) $(CFLAGS) -MM $(SOURCES) 1> 2_makefile_deps - for i in $(EXECS) ; do\ - echo >> 2_makefile_deps;\ - $(ECHO) "$$i : $$i.cli.o" >> 2_makefile_deps;\ - $(ECHO) " $(CC) -o $$i $$i.cli.o" >> 2_makefile_deps;\ - done - @echo '______end make $@_____' - -lib: clear_test_flags - @echo '---- make $@:------------------------------------------------------------' - @echo `pwd`'>' - if [ ! -e 2_makefile_deps ]; then make deps; fi # the user must delete 2_makefile_deps if deps change! - make sub_lib - @echo '______end make $@_____' - -sub_lib: $(LIB) - - -$(LIBPATH)/$(LIB): - @if [ "$(LIBPATH)" != "$(APPLICATION_BASE)" ]; then \ - echo "LIBPATH: " "$(LIBPATH)";\ - echo "$APPLICATION_BASE: " "$(APPLICATION_BASE)";\ - echo "The library path is not the same as the application base so don't know how to make it.";\ - fi - [ "$(LIBPATH)" == "$(APPLICATION_BASE)" ] - cd $(APPLICATION_BASE); make lib - -execs: $(LIBPATH)/$(LIB) - @echo '---- make $@:------------------------------------------------------------' - @echo `pwd`'>' - if [ ! -e 2_makefile_deps ]; then make deps; fi - make sub_execs - # for i in $(EXEC_OBJECTS); do rm $$i; done - @echo '______end make $@_____' - -sub_execs: $(EXECS) - -install: all - @echo '---- make $@:------------------------------------------------------------' - @echo `pwd`'>' - @if[ ! -e 1_tests_passed ]; then echo "can't install as tests have not passed"; fi - @test -e test_passed - for i in $(BIN); do cp $$i $(RT_BASE)/bin; done - cp $(LIB) $(RT_BASE)/lib - cp $(APPLICATION).h $(RT_BASE)/include - if [ -d $(APPLICATION) ]; then cp $(APPLICATION)/*.h $(RT_BASE)/include/$(APPLICATION); fi - @echo '______end make $@_____' - -# "make lib" "make execs" now cleans up the .o files afterward, so clean should not be needed often -# clean works on the current working directory, dist_clean also descends into 1_tests and 1_try -# -clean: - @echo '---- make $@:------------------------------------------------------------' - @echo `pwd`'>' - for i in $(wildcard *~); do mv $$i $(SCRATCHDIR); done - for i in $(wildcard *.lib.o) $(wildcard *.exl.o) $(wildcard *.ex.o); do rm $$i; done - if [ -f 2_makefile_deps ]; then rm 2_makefile_deps; fi - if [ -f $(LIB) ]; then mv $(LIB) 5_scratch; fi - for i in $(EXEC_WL) $(EXEC); do if [ -e $$i ]; then rm $$i; fi; done - @echo '______end make $@_____' - - -# dist_clean is used to clean thing up before doing a checkin, hg add should be safe after a dist_clean -# dist_clean will recurse into the include directory = $(APPLICATION), tests, and try if they are present -# -dist_clean: - @echo '---- make $@:------------------------------------------------------------' - @echo `pwd`'>' - make clean - if [ -d $(APPLICATION) ]; then cd $(APPLICATION); make clean; fi - if [ -d 1_tests ]; then cd 1_tests; make clean; fi - if [ -d 1_try ] ; then cd 1_try; make clean; fi - @echo '______end make $@_____' - - --include 2_makefile_deps - -# recipe for making object files: -# -%.o : %.cc - $(CC) $(CFLAGS) -c $< - - -# -$(LIB) : $(LIB_OBJECTS) - ar rcs $(LIB) $(LIB_OBJECTS) -# for i in $(LIB_OBJECTS); do rm $$i; done - - - diff --git a/src/5_scratch/subu-config.lib.h b/src/5_scratch/subu-config.lib.h deleted file mode 100644 index d2b1f97..0000000 --- a/src/5_scratch/subu-config.lib.h +++ /dev/null @@ -1,9 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -#include -typedef unsigned int uint; -int subu_number(sqlite3 *db,uint&subu_number); -int schema(sqlite3 *db,uint max_subu_number); -extern char config_file[]; -#define ERR_CONFIG_FILE -1 -#define INTERFACE 0 diff --git a/src/5_scratch/subu-init.cli.h b/src/5_scratch/subu-init.cli.h deleted file mode 100644 index 46bfd20..0000000 --- a/src/5_scratch/subu-init.cli.h +++ /dev/null @@ -1,10 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -#include -#define ERR_CONFIG_FILE -1 -typedef unsigned int uint; -int schema(sqlite3 *db,uint max_subu_number); -extern char config_file[]; -int main(); -int main(); -int main(int argc,char **argv,char **env); diff --git a/src/5_scratch/subu-mk-0.cli.h b/src/5_scratch/subu-mk-0.cli.h deleted file mode 100644 index 075b350..0000000 --- a/src/5_scratch/subu-mk-0.cli.h +++ /dev/null @@ -1,8 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -#include -extern char config_file[]; -int subu_mk_0(char *subuname,char *config_file); -int main(); -int main(); -int main(int argc,char **argv,char **env); diff --git a/src/5_scratch/subu-mk-0.lib.h b/src/5_scratch/subu-mk-0.lib.h deleted file mode 100644 index 8f6969c..0000000 --- a/src/5_scratch/subu-mk-0.lib.h +++ /dev/null @@ -1,13 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -int dispatch_exec(char **argv,char **envp); -struct dispatch_useradd_ret_t dispatch_useradd(char **argv,char **envp); -int dispatch_f_euid_egid(char *fname,int(*f)(void *arg),void *f_arg,uid_t euid,gid_t egid); -#include -#define ERR_CONFIG_FILE -1 -int dbprintf(const char *format,...); -extern char config_file[]; -int subu_mk_0(char *subuname,char *config_file); -int masteru_makes_subuhome(void *arg); -int allowed_subuname(char *subuname); -typedef unsigned int uint; diff --git a/src/5_scratch/subu-number.cli.h b/src/5_scratch/subu-number.cli.h deleted file mode 100644 index 7605c8e..0000000 --- a/src/5_scratch/subu-number.cli.h +++ /dev/null @@ -1,10 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -#include -typedef unsigned int uint; -int subu_number(sqlite3 *db,uint&subu_number); -#define ERR_CONFIG_FILE -1 -extern char config_file[]; -int main(); -int main(); -int main(int argc,char **argv,char **env); diff --git a/src/common.lib.h b/src/common.lib.h deleted file mode 100644 index 6b7f7c9..0000000 --- a/src/common.lib.h +++ /dev/null @@ -1,4 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -typedef unsigned int uint; -#define INTERFACE 0 diff --git a/src/common.lib.o b/src/common.lib.o deleted file mode 100644 index 88e4513..0000000 Binary files a/src/common.lib.o and /dev/null differ diff --git a/src/dbprintf.lib.h b/src/dbprintf.lib.h deleted file mode 100644 index 3056cf6..0000000 --- a/src/dbprintf.lib.h +++ /dev/null @@ -1,3 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -int dbprintf(const char *format,...); diff --git a/src/dispatch_exec.lib.h b/src/dispatch_exec.lib.h deleted file mode 100644 index 877a38e..0000000 --- a/src/dispatch_exec.lib.h +++ /dev/null @@ -1,4 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -int dbprintf(const char *format,...); -int dispatch_exec(char **argv,char **envp); diff --git a/src/dispatch_f.lib.h b/src/dispatch_f.lib.h deleted file mode 100644 index 994592d..0000000 --- a/src/dispatch_f.lib.h +++ /dev/null @@ -1,5 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -int dispatch_f_euid_egid(char *fname,int(*f)(void *arg),void *f_arg,uid_t euid,gid_t egid); -int dbprintf(const char *format,...); -int dispatch_f(char *fname,int(*f)(void *arg),void *f_arg); diff --git a/src/dispatch_useradd.lib.h b/src/dispatch_useradd.lib.h deleted file mode 100644 index 0ce7e9d..0000000 --- a/src/dispatch_useradd.lib.h +++ /dev/null @@ -1,16 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -int dispatch_exec(char **argv,char **envp); -#include -#include -typedef struct dispatch_useradd_ret_t dispatch_useradd_ret_t; -typedef unsigned int uint; -struct dispatch_useradd_ret_t { - uint error; - struct passwd *pw_record; -}; -struct dispatch_useradd_ret_t dispatch_useradd(char **argv,char **envp); -#define ERR_DISPATCH_USERADD_PWREC 3 -#define ERR_DISPATCH_USERADD_DISPATCH 2 -#define ERR_DISPATCH_USERADD_ARGC 1 -#define INTERFACE 0 diff --git a/src/dispatch_useradd.lib.o b/src/dispatch_useradd.lib.o deleted file mode 100644 index 079dd04..0000000 Binary files a/src/dispatch_useradd.lib.o and /dev/null differ diff --git a/src/subu-config.lib.h b/src/subu-config.lib.h deleted file mode 100644 index c359b52..0000000 --- a/src/subu-config.lib.h +++ /dev/null @@ -1,9 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -#include -typedef unsigned int uint; -int subu_number(sqlite3 *db,uint **subu_number); -int schema(sqlite3 *db,uint max_subu_number); -extern char config_file[]; -#define ERR_CONFIG_FILE -1 -#define INTERFACE 0 diff --git a/src/subu-init.cli.h b/src/subu-init.cli.h deleted file mode 100644 index 46bfd20..0000000 --- a/src/subu-init.cli.h +++ /dev/null @@ -1,10 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -#include -#define ERR_CONFIG_FILE -1 -typedef unsigned int uint; -int schema(sqlite3 *db,uint max_subu_number); -extern char config_file[]; -int main(); -int main(); -int main(int argc,char **argv,char **env); diff --git a/src/subu-mk-0.cli.h b/src/subu-mk-0.cli.h deleted file mode 100644 index 075b350..0000000 --- a/src/subu-mk-0.cli.h +++ /dev/null @@ -1,8 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -#include -extern char config_file[]; -int subu_mk_0(char *subuname,char *config_file); -int main(); -int main(); -int main(int argc,char **argv,char **env); diff --git a/src/subu-mk-0.lib.h b/src/subu-mk-0.lib.h deleted file mode 100644 index 82c7e14..0000000 --- a/src/subu-mk-0.lib.h +++ /dev/null @@ -1,29 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -int dispatch_exec(char **argv,char **envp); -#include -#include -typedef struct dispatch_useradd_ret_t dispatch_useradd_ret_t; -typedef unsigned int uint; -struct dispatch_useradd_ret_t { - uint error; - struct passwd *pw_record; -}; -struct dispatch_useradd_ret_t dispatch_useradd(char **argv,char **envp); -int dispatch_f_euid_egid(char *fname,int(*f)(void *arg),void *f_arg,uid_t euid,gid_t egid); -int dbprintf(const char *format,...); -#include -extern char config_file[]; -int subu_mk_0(char *subuname,char *config_file); -int masteru_makes_subuhome(void *arg); -int allowed_subuname(char *subuname); -#define ERR_SUBU_MK_0_SETFACL 9 -#define ERR_SUBU_MK_0_FAILED_USERADD 8 -#define ERR_SUBU_MK_0_BUG_SSS 7 -#define ERR_SUBU_MK_0_FAILED_MKDIR_SUBU 6 -#define ERR_SUBU_MK_0_MK_SUBUHOME 5 -#define ERR_SUBU_MK_0_MALLOC 4 -#define ERR_SUBU_MK_0_BAD_MASTERU_HOME 3 -#define ERR_SUBU_MK_0_SETUID_ROOT 2 -#define ERR_SUBU_MK_0_CONFIG_FILE 1 -#define INTERFACE 0 diff --git a/src/subu-mk-0.lib.o b/src/subu-mk-0.lib.o deleted file mode 100644 index 0322536..0000000 Binary files a/src/subu-mk-0.lib.o and /dev/null differ diff --git a/src/subu-number.cli.h b/src/subu-number.cli.h deleted file mode 100644 index 759d808..0000000 --- a/src/subu-number.cli.h +++ /dev/null @@ -1,10 +0,0 @@ -/* This file was automatically generated. Do not edit! */ -#undef INTERFACE -#include -typedef unsigned int uint; -int subu_number(sqlite3 *db,uint **subu_number); -#define ERR_CONFIG_FILE -1 -extern char config_file[]; -int main(); -int main(); -int main(int argc,char **argv,char **env);