From 3359aa824857124141ee7c936d9cf0c49021b5ca Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Tue, 2 Apr 2019 14:42:29 +0200 Subject: [PATCH] first db namespace -> debug --- makefile | 34 +- module/{db => debug}/lib/libda.a | Bin module/{db => debug}/makefile | 0 module/{db => debug}/makefile-flags | 0 .../src/db.lib.c => debug/src/debug.lib.c} | 4 +- .../src/db.lib.h => debug/src/debug.lib.h} | 2 +- module/dispatch/dispatch.lib.c | 12 +- module/dispatch/makefile | 1 + module/dispatch/trc/dispatch.trc.c | 61 +-- module/share/include/db.h | 2 +- module/share/include/dispatch.h | 32 ++ module/share/lib/libda.a | Bin 6698 -> 0 bytes module/share/lib/libdb.a | Bin 6698 -> 0 bytes module/share/lib/libtranche.a | Bin 17304 -> 0 bytes .../subu-0/1_deprecated/dispatch_exec.lib.c | 60 --- module/subu-0/1_deprecated/dispatch_f.lib.c | 130 ------ .../1_deprecated/dispatch_useradd.lib.c | 68 ---- module/subu-0/1_deprecated/subu-rm-0.lib.c | 381 ------------------ .../1_deprecated/subudb-number-next.cli.c | 45 --- module/subu-0/common.lib.c | 20 - module/subu-0/{ => deprecated}/0_makefile | 0 .../subu-0/{ => deprecated}/0_makefile-flags | 0 module/subu-0/{ => deprecated}/1_tmp/da.lib.h | 0 .../{ => deprecated}/1_tmp/dbprintf.lib.h | 0 .../{ => deprecated}/1_tmp/dispatch.lib.h | 0 .../1_tmp/subu-bind-all.cli.h | 0 .../{ => deprecated}/1_tmp/subu-bind.cli.h | 0 .../{ => deprecated}/1_tmp/subu-common.lib.h | 0 .../{ => deprecated}/1_tmp/subu-mk-0.cli.h | 0 .../{ => deprecated}/1_tmp/subu-rm-0.cli.h | 0 .../subu-0/{ => deprecated}/1_tmp/subu.lib.h | 0 .../{ => deprecated}/1_tmp/subudb-init.cli.h | 0 .../1_tmp/subudb-number.cli.h | 0 .../1_tmp/subudb-rel-get.cli.h | 0 .../1_tmp/subudb-rel-put.cli.h | 0 .../1_tmp/subudb-rel-rm.cli.h | 0 .../{ => deprecated}/1_tmp/subudb-subus.cli.h | 0 .../{ => deprecated}/1_tmp/subudb.lib.h | 0 module/subu-0/{1_doc => doc}/to_do.txt | 0 .../{dispatch/#makefile# => subu-0/makefile} | 3 +- module/subu-0/makefile-flags | 33 ++ module/subu-0/{1_tests => test}/0_makefile | 0 .../subu-0/{1_tests => test}/0_makefile_flags | 0 .../{1_tests => test}/1_tmp/makefile_deps | 0 module/subu-0/{1_tests => test}/da.cli.c | 0 module/subu-0/{1_tests => test}/libtests.a | 0 module/subu-0/trc/common.lib.c | 29 ++ module/subu-0/{ => trc}/db.lib.c | 0 module/subu-0/{ => trc}/subu-bind-all.cli.c | 0 module/subu-0/{ => trc}/subu-bind.cli.c | 0 module/subu-0/{ => trc}/subu-mk-0.cli.c | 0 module/subu-0/{ => trc}/subu-rm-0.cli.c | 0 module/subu-0/{ => trc}/subu.lib.c | 54 +-- module/subu-0/{ => trc}/subudb-init.cli.c | 0 module/subu-0/{ => trc}/subudb-number.cli.c | 0 module/subu-0/{ => trc}/subudb-rel-get.cli.c | 0 module/subu-0/{ => trc}/subudb-rel-put.cli.c | 0 module/subu-0/{ => trc}/subudb-rel-rm.cli.c | 0 module/subu-0/{ => trc}/subudb-subus.cli.c | 0 module/subu-0/{1_try => try}/split.c | 0 module/subu-0/{1_try => try}/split_arg.c | 0 module/subu-0/{1_try => try}/subudb | 0 module/subu-0/{1_try => try}/voidptr.c | 0 module/temp | 10 - module/tranche/makefile | 2 +- module/tranche/src/tranche.lib.c | 10 +- tool/bin/tranche | Bin 38496 -> 38520 bytes tool/bin/tranche-make | Bin 38600 -> 38624 bytes tool/bin/tranche-target | Bin 38616 -> 38640 bytes tool/lib/dot_emacs | 35 +- 70 files changed, 196 insertions(+), 832 deletions(-) rename module/{db => debug}/lib/libda.a (100%) rename module/{db => debug}/makefile (100%) rename module/{db => debug}/makefile-flags (100%) rename module/{db/src/db.lib.c => debug/src/debug.lib.c} (73%) rename module/{db/src/db.lib.h => debug/src/debug.lib.h} (50%) create mode 100644 module/share/include/dispatch.h delete mode 100644 module/share/lib/libda.a delete mode 100644 module/share/lib/libdb.a delete mode 100644 module/share/lib/libtranche.a delete mode 100644 module/subu-0/1_deprecated/dispatch_exec.lib.c delete mode 100644 module/subu-0/1_deprecated/dispatch_f.lib.c delete mode 100644 module/subu-0/1_deprecated/dispatch_useradd.lib.c delete mode 100644 module/subu-0/1_deprecated/subu-rm-0.lib.c delete mode 100644 module/subu-0/1_deprecated/subudb-number-next.cli.c delete mode 100644 module/subu-0/common.lib.c rename module/subu-0/{ => deprecated}/0_makefile (100%) rename module/subu-0/{ => deprecated}/0_makefile-flags (100%) rename module/subu-0/{ => deprecated}/1_tmp/da.lib.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/dbprintf.lib.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/dispatch.lib.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subu-bind-all.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subu-bind.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subu-common.lib.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subu-mk-0.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subu-rm-0.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subu.lib.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subudb-init.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subudb-number.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subudb-rel-get.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subudb-rel-put.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subudb-rel-rm.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subudb-subus.cli.h (100%) rename module/subu-0/{ => deprecated}/1_tmp/subudb.lib.h (100%) rename module/subu-0/{1_doc => doc}/to_do.txt (100%) rename module/{dispatch/#makefile# => subu-0/makefile} (93%) create mode 100644 module/subu-0/makefile-flags rename module/subu-0/{1_tests => test}/0_makefile (100%) rename module/subu-0/{1_tests => test}/0_makefile_flags (100%) rename module/subu-0/{1_tests => test}/1_tmp/makefile_deps (100%) rename module/subu-0/{1_tests => test}/da.cli.c (100%) rename module/subu-0/{1_tests => test}/libtests.a (100%) create mode 100644 module/subu-0/trc/common.lib.c rename module/subu-0/{ => trc}/db.lib.c (100%) rename module/subu-0/{ => trc}/subu-bind-all.cli.c (100%) rename module/subu-0/{ => trc}/subu-bind.cli.c (100%) rename module/subu-0/{ => trc}/subu-mk-0.cli.c (100%) rename module/subu-0/{ => trc}/subu-rm-0.cli.c (100%) rename module/subu-0/{ => trc}/subu.lib.c (91%) rename module/subu-0/{ => trc}/subudb-init.cli.c (100%) rename module/subu-0/{ => trc}/subudb-number.cli.c (100%) rename module/subu-0/{ => trc}/subudb-rel-get.cli.c (100%) rename module/subu-0/{ => trc}/subudb-rel-put.cli.c (100%) rename module/subu-0/{ => trc}/subudb-rel-rm.cli.c (100%) rename module/subu-0/{ => trc}/subudb-subus.cli.c (100%) rename module/subu-0/{1_try => try}/split.c (100%) rename module/subu-0/{1_try => try}/split_arg.c (100%) rename module/subu-0/{1_try => try}/subudb (100%) rename module/subu-0/{1_try => try}/voidptr.c (100%) delete mode 100644 module/temp diff --git a/makefile b/makefile index 2cf9bb5..06d6508 100755 --- a/makefile +++ b/makefile @@ -1,32 +1,38 @@ -#MAKEABLE=$(shell \ -# find src-*\ -# \( -name 'makefile' -o -name 'Makefile' \)\ -# -printf "%h\n"\ -# | grep -v deprecated | grep -v doc | sort -u | sed ':a;N;$!ba;s/\n/ /g' \ -#) -MAKEABLE= module/da module/da/test module/db module/tranche module/dispatch - -.PHONY: all info clean dist-clean +MAKEABLE=\ + module/da\ + module/da/test\ + module/debug\ + module/tranche\ + module/dispatch +.PHONY: all all: $(foreach dir, $(MAKEABLE), \ - make -C $$dir - -make -C $$dir stage + -make -C $$dir dist-clean dep lib exec share + ) + +.PHONY: all +update: + $(foreach dir, $(MAKEABLE), \ + -make -C $$dir lib exec share ) +.PHONY: info info: @echo "SRCDIRS:" $(SRCDIRS) @echo "MAKEABLE:" $(MAKEABLE) +.PHONY: clean clean: for dir in $(MAKEABLE); do pushd $$dir; make clean; popd; done +.PHONY: dist-clean dist-clean : for dir in $(MAKEABLE); do pushd $$dir; make dist-clean; popd; done - for i in $(wildcard stage/lib/*); do rm $$i; done - for i in $(wildcard stage/inc/*); do rm $$i; done - for i in $(wildcard stage/bin/*); do rm $$i; done + for i in $(wildcard module/share/lib/*); do rm $$i; done + for i in $(wildcard module/share/inc/*); do rm $$i; done + for i in $(wildcard module/share/bin/*); do rm $$i; done diff --git a/module/db/lib/libda.a b/module/debug/lib/libda.a similarity index 100% rename from module/db/lib/libda.a rename to module/debug/lib/libda.a diff --git a/module/db/makefile b/module/debug/makefile similarity index 100% rename from module/db/makefile rename to module/debug/makefile diff --git a/module/db/makefile-flags b/module/debug/makefile-flags similarity index 100% rename from module/db/makefile-flags rename to module/debug/makefile-flags diff --git a/module/db/src/db.lib.c b/module/debug/src/debug.lib.c similarity index 73% rename from module/db/src/db.lib.c rename to module/debug/src/debug.lib.c index 8e6fe5d..01ba20d 100644 --- a/module/db/src/db.lib.c +++ b/module/debug/src/debug.lib.c @@ -1,10 +1,10 @@ -#include "db.lib.h" +#include "debug.lib.h" #include #include -int dbprintf(const char *format, ...){ +int debug_printf(const char *format, ...){ va_list args; va_start(args,format); int ret = vfprintf(stdout, format, args); diff --git a/module/db/src/db.lib.h b/module/debug/src/debug.lib.h similarity index 50% rename from module/db/src/db.lib.h rename to module/debug/src/debug.lib.h index 7563eea..f1be3d8 100644 --- a/module/db/src/db.lib.h +++ b/module/debug/src/debug.lib.h @@ -1,6 +1,6 @@ #ifndef DB_LIB_H #define DB_LIB_H -int dbprintf(const char *format, ...); +int debug_printf(const char *format, ...); #endif diff --git a/module/dispatch/dispatch.lib.c b/module/dispatch/dispatch.lib.c index c8303d4..de7011f 100644 --- a/module/dispatch/dispatch.lib.c +++ b/module/dispatch/dispatch.lib.c @@ -45,7 +45,7 @@ void dispatch_f_mess(char *fname, int err, char *dispatchee){ // interface call point, dispatch a function int dispatch_f(char *fname, int (*f)(void *arg), void *f_arg){ #ifdef DEBUG - dbprintf("%s %s\n", "dispatch_f", fname); + debug_printf("%s %s\n", "dispatch_f", fname); #endif pid_t pid = fork(); if( pid == -1 ) return ERR_DISPATCH_F_FORK; // something went wrong and we are still in the parent process @@ -65,7 +65,7 @@ int dispatch_f(char *fname, int (*f)(void *arg), void *f_arg){ // of course this will only work if our euid is root in the first place int dispatch_f_euid_egid(char *fname, int (*f)(void *arg), void *f_arg, uid_t euid, gid_t egid){ #ifdef DEBUG - dbprintf("%s %s as euid:%u egid:%u\n", "dispatch_f_euid_egid", fname, euid, egid); + debug_printf("%s %s as euid:%u egid:%u\n", "dispatch_f_euid_egid", fname, euid, egid); #endif pid_t pid = fork(); if( pid == -1 ) return ERR_DISPATCH_F_FORK; @@ -94,13 +94,13 @@ int dispatch_exec(char **argv, char **envp){ { if( !argv || !argv[0] ) return ERR_DISPATCH_NULL_EXECUTABLE; #ifdef DEBUG - dbprintf("dispatch_exec:"); + debug_printf("dispatch_exec:"); char **apt = argv; while( *apt ){ - dbprintf(" %s",*apt); + debug_printf(" %s",*apt); apt++; } - dbprintf("\n"); + debug_printf("\n"); #endif command = argv[0]; } @@ -109,7 +109,7 @@ int dispatch_exec(char **argv, char **envp){ if( pid == 0 ){ // we are the child execvpe(command, argv, envp); // exec will only return if it has an error #ifdef DEBUG - dbprintf("dispatch_exec: exec returned, perror message:"); + debug_printf("dispatch_exec: exec returned, perror message:"); perror("dispatch_exec"); // our only chance to print this message, as this is the child process #endif fflush(stdout); diff --git a/module/dispatch/makefile b/module/dispatch/makefile index 82d110d..ab3ffe5 100644 --- a/module/dispatch/makefile +++ b/module/dispatch/makefile @@ -35,6 +35,7 @@ dep: .PHONY: lib lib: $(MAKE) $@ + cp $(SRCDIR)/dispatch.lib.h $(INCDIR)/dispatch.h %:: $(MAKE) $@ diff --git a/module/dispatch/trc/dispatch.trc.c b/module/dispatch/trc/dispatch.trc.c index 24d7cd3..c24b0ab 100644 --- a/module/dispatch/trc/dispatch.trc.c +++ b/module/dispatch/trc/dispatch.trc.c @@ -1,36 +1,35 @@ #tranche dispatch.lib.c #tranche dispatch.lib.h -/* - Runs a command or function as its own process. + /* + Runs a command or function as its own process. - The return status integer from command or function must be greater than ERR_DISPATCH. - In the case of dispatch_exec, we only have a promise from the user to not dispatch - non compliant commands. + The return status integer from command or function must be greater than ERR_DISPATCH. + In the case of dispatch_exec, we only have a promise from the user to not dispatch + non compliant commands. -*/ -#ifndef DISPATCH_LIB_H -#define DISPATCH_LIB_H -#include -#include + */ + #ifndef DISPATCH_LIB_H + #define DISPATCH_LIB_H + #include + #include -#define ERR_DISPATCH -1024 -#define ERR_DISPATCH_NEGATIVE_RETURN_STATUS -1024 -#define ERR_DISPATCH_F_FORK -1025 -#define ERR_DISPATCH_F_SETEUID -1026 -#define ERR_DISPATCH_F_SETEGID -1027 -#define ERR_DISPATCH_NULL_EXECUTABLE -1028 -#define ERR_DISPATCH_EXEC -1029 + #define ERR_DISPATCH -1024 + #define ERR_DISPATCH_NEGATIVE_RETURN_STATUS -1024 + #define ERR_DISPATCH_F_FORK -1025 + #define ERR_DISPATCH_F_SETEUID -1026 + #define ERR_DISPATCH_F_SETEGID -1027 + #define ERR_DISPATCH_NULL_EXECUTABLE -1028 + #define ERR_DISPATCH_EXEC -1029 -// currently both dispatcher and dispatchee strings are statically allocated -struct dispatch_ctx{ - char *dispatcher; // name of the dispatch function ("dispatch_f", "dispatch_f_euid_egid", etc.) - char *dispatchee; // name of the function being dispatched - int err; // error code as listed below, or status returned from dispatchee -}; + // currently both dispatcher and dispatchee strings are statically allocated + struct dispatch_ctx{ + char *dispatcher; // name of the dispatch function ("dispatch_f", "dispatch_f_euid_egid", etc.) + char *dispatchee; // name of the function being dispatched + int err; // error code as listed below, or status returned from dispatchee + }; #tranche-end -#include "dispatch.lib.h" // we need the declaration for uid_t etc. // without this #define execvpe is undefined @@ -40,6 +39,8 @@ struct dispatch_ctx{ #include #include #include +#include +#include "dispatch.lib.h" #tranche dispatch.lib.h void dispatch_f_mess(char *fname, int err, char *dispatchee); @@ -81,7 +82,7 @@ int dispatch_f(char *fname, int (*f)(void *arg), void *f_arg); #tranche-end int dispatch_f(char *fname, int (*f)(void *arg), void *f_arg){ #ifdef DEBUG - dbprintf("%s %s\n", "dispatch_f", fname); + debug_printf("%s %s\n", "dispatch_f", fname); #endif pid_t pid = fork(); if( pid == -1 ) return ERR_DISPATCH_F_FORK; // something went wrong and we are still in the parent process @@ -104,7 +105,7 @@ int dispatch_f_euid_egid(char *fname, int (*f)(void *arg), void *f_arg, uid_t eu #tranche-end int dispatch_f_euid_egid(char *fname, int (*f)(void *arg), void *f_arg, uid_t euid, gid_t egid){ #ifdef DEBUG - dbprintf("%s %s as euid:%u egid:%u\n", "dispatch_f_euid_egid", fname, euid, egid); + debug_printf("%s %s as euid:%u egid:%u\n", "dispatch_f_euid_egid", fname, euid, egid); #endif pid_t pid = fork(); if( pid == -1 ) return ERR_DISPATCH_F_FORK; @@ -136,13 +137,13 @@ int dispatch_exec(char **argv, char **envp){ { if( !argv || !argv[0] ) return ERR_DISPATCH_NULL_EXECUTABLE; #ifdef DEBUG - dbprintf("dispatch_exec:"); + debug_printf("dispatch_exec:"); char **apt = argv; while( *apt ){ - dbprintf(" %s",*apt); + debug_printf(" %s",*apt); apt++; } - dbprintf("\n"); + debug_printf("\n"); #endif command = argv[0]; } @@ -151,7 +152,7 @@ int dispatch_exec(char **argv, char **envp){ if( pid == 0 ){ // we are the child execvpe(command, argv, envp); // exec will only return if it has an error #ifdef DEBUG - dbprintf("dispatch_exec: exec returned, perror message:"); + debug_printf("dispatch_exec: exec returned, perror message:"); perror("dispatch_exec"); // our only chance to print this message, as this is the child process #endif fflush(stdout); diff --git a/module/share/include/db.h b/module/share/include/db.h index 7563eea..f1be3d8 100644 --- a/module/share/include/db.h +++ b/module/share/include/db.h @@ -1,6 +1,6 @@ #ifndef DB_LIB_H #define DB_LIB_H -int dbprintf(const char *format, ...); +int debug_printf(const char *format, ...); #endif diff --git a/module/share/include/dispatch.h b/module/share/include/dispatch.h new file mode 100644 index 0000000..8b99d43 --- /dev/null +++ b/module/share/include/dispatch.h @@ -0,0 +1,32 @@ + /* + Runs a command or function as its own process. + + The return status integer from command or function must be greater than ERR_DISPATCH. + In the case of dispatch_exec, we only have a promise from the user to not dispatch + non compliant commands. + + */ + #ifndef DISPATCH_LIB_H + #define DISPATCH_LIB_H + #include + #include + + #define ERR_DISPATCH -1024 + #define ERR_DISPATCH_NEGATIVE_RETURN_STATUS -1024 + #define ERR_DISPATCH_F_FORK -1025 + #define ERR_DISPATCH_F_SETEUID -1026 + #define ERR_DISPATCH_F_SETEGID -1027 + #define ERR_DISPATCH_NULL_EXECUTABLE -1028 + #define ERR_DISPATCH_EXEC -1029 + + // currently both dispatcher and dispatchee strings are statically allocated + struct dispatch_ctx{ + char *dispatcher; // name of the dispatch function ("dispatch_f", "dispatch_f_euid_egid", etc.) + char *dispatchee; // name of the function being dispatched + int err; // error code as listed below, or status returned from dispatchee + }; +void dispatch_f_mess(char *fname, int err, char *dispatchee); +int dispatch_f(char *fname, int (*f)(void *arg), void *f_arg); +int dispatch_f_euid_egid(char *fname, int (*f)(void *arg), void *f_arg, uid_t euid, gid_t egid); +int dispatch_exec(char **argv, char **envp); +#endif diff --git a/module/share/lib/libda.a b/module/share/lib/libda.a deleted file mode 100644 index c6e819fbcdc5f11f1108a9ea971b7136e2aebbb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6698 zcmbVQeQaA-6~E7p9VbrWH10>z4CGGG)nm4kG)kA7%J!7d#>%= zxI)@h-n-}byXTyH?z#89cbs)w4J)1B-kyjoZG)RO4G#=&9vd5sLnBvsR((WEsn(;>AKLUXflKy$z3zZ61n<`{2O9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Yo7J6{iXxf-;>qSUqg0SI({_^d-sDVp}+L8i@jYyBOqfm85GxCLmu zu<@7J&aUoHdUkdCJuiZW;G5m?E!M*Rj$g@T&D*rn#flDIDNUM}3Pg3ti!YZZ%`0lZ zWg}kYr7RV^42%2a&C8Y*qg=_$c)_sDz$?myCOog~mhd=ZPeUH$2Le8HqKa6e%~QMB@Zohn4pFy=?fs48~?`8K$^@qj_&r4RIy z|2%zGR`Jm~|69WFapw)qYhNIcF~8W*PvfzUbGGj1O)}b|@Z-cEQusLW_bL2`2*b}v z-emm0AZ#i83xuH{<4x*+ko-TU@PDKHd{N=?nZ|a3-|Oot5dN0Jj}rc#!k5U;4;B75 z#J{ZYA13})g_rq#UE#k=_;(7wK_*(aHFpCSK86~3SFyu#y8NNn=F%k}<*;`yASzmD?! zgu=&&|GL7TCqJ(!{H=t4rSMM@{-?sfK-f?7$T-&%?os%!h-I;NDm?yp!ZxY!orDi4 z{6}csBgEr!h~j=KivBk^3;%6U_@^lk@>_%PH&zw$+p7A1i~Om4gm{dlF&-ATkC&jf zgWj=3pO=zl7LB-L&O0p5>)d$CwppCB88hYP^g=mXfiW%{sgz~TEg3c}qnv{uc8wQ&J2J{L7f0 Z|8b7$H+B8Eug&bQQ~Vd}rd(3({|8B+KqCME diff --git a/module/share/lib/libdb.a b/module/share/lib/libdb.a deleted file mode 100644 index c40204a39c2c85f72ad6ffed0150d47388f4f3ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6698 zcmbVQeQaA-6~E7p9VbrWH10>z4CGGG)nm4kG)kA7%J!7d#>%= zxI)@h-n-}byXTyH?z#89cbs)w4J)1B-kyjoZG)RO4G#?rjtp;(LnBvsR((WEsn(;>AKLUXflKy$z3zZ61n<`{2O9$N)GV*|cd$_?u~eXmWbD zM?;6AX>2=pFR|>;t&|dD<6InPD_NKwN>=}neB{q>0F|shzv0G>8_DW3_ww${4DS~6 z&`nntW_ha&cilcGZP(>`wY%m?ckw${Dmvo?H~My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module/share/lib/libtranche.a deleted file mode 100644 index 3e540aaad5ee93555fcb13e57d47c03d6669a2bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17304 zcmd5@eRNz$b)UDZCp}5lm*vEgZOHm7R${a($+l!WwjF) z-$0(8CgMp~ZUG9s6WCI?5{$bdT>PeyXl;Y*Q7 z!cBUpn~W845naTS1<(`7MKi;0PB0xz#0P>Y=&0Vem21{?bp+Jk_O`apHt1G+S6h3h z>~nwBT|L+L`Ya2&rivvthyul^5UbZ0uDj)Bx42Bq5q;tDSHffG>%-%BOrNvEV?EPW zc%o;z?n!aa*<8!3$QhofCn#KZ=4{x4e=pWOCF-6!yHo^(ID9t$yeE>ccp62{tqV`s zctNt^i5f|be>Xh-oK$-FY>rqP3|8yK7ryyt?NtC`^=f!LKPBTeh4GrYG+qe3Q@p0a z<2}>A{36Eaj|zHD20gsI2NeAix)2`!0S6aUUkD%Vy8tja>cM~7_=3_Yud8*3w_Ut= z@t8MKZ4i@}ASN#Y$4lV}ft`cP7o{hVPtQCFNqJ^t8T5AiIhi6d3&wlSPxPE0o4%M| z66S<~oavhmA6=yqMq@rV2l{j#v|iBqRB%D2Ft`A{mOV!u9|R{kC^K^QOiu{PNV6Ti zmOdO^^({>e*q?r9mEfMraWybtAw2Ou0KZ$pP_fHj)NFY!ed`d!_Xu?EQ21!ii)V0x zdq$4-oH~QIHw`#;1_JE?zx*F0Ci;$`tQI;oKF_`Sv9};dhtJj>{)yy6p66bD`S%z( z=<3)V(;~N9jY-cb68{Z~9PK*>8W}q9HbO{J=dpRB2b`Aqw-UQ`wC5N$e*##~?L=?R zfJM(w1i}-SDacFO66i!9rrIIW{v~DnMbEf2%y*i)d)`Ki7P?ztDe_f0hNfk5dU+k- zxemr&E#&nS<@JTSC%c_{&gPdwGvr-8RFE8=?-0}naBf~WveP*R_GeTpbv@fNExZ|f zbk&_&64X7}Gwli1gFj$FOLArHZ$JQU*tOCR8i8|-q)~Ut)AY_ggBe(uX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_z&5`@O_bv$uAtJ z9qfr99Kz$*LLvzNm&y&oR|N2d34DJ;`DrMH z)8oSrpYaja?IG%7>Pl6&(EVUGkSI&jS@3&1WJ8>$BV4I+jP93scBU7WXAIB25HsbU z*Y3B>i?!*0J7M}TL3e4 zqU0yYKHsMi!(#F#0GrAF1+vd^Li_N2_a*l4Af4( zj~|vm!83ooupHNu(8$+1-$jzwF}yZ;A0y1nU-f?q;Oljxf#c75ABBsV;^$nWI1Z6P zj9)$cSf1mG&4vjn*hHJbBNRUzPTWtL@|Y9m+(iW^mf&9@)*H&r{$rZYB!7esXirHk Jg+HeJ{{!2)dn5n= diff --git a/module/subu-0/1_deprecated/dispatch_exec.lib.c b/module/subu-0/1_deprecated/dispatch_exec.lib.c deleted file mode 100644 index 024bff8..0000000 --- a/module/subu-0/1_deprecated/dispatch_exec.lib.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - fork/execs/wait the command passed in argv[0]; - Returns -1 upon failure. - - The wstatus returned from wait() might be either the error returned by exec - when it failed, or the return value from the command. An arbitary command is - passed in, so we don't know what its return values might be. Consquently, we - have no way of multiplexing a unique exec error code with the command return - value within wstatus. If the prorgrammer knows the return values of the - command passed in, and wants better behavior, he or she can spin a special - version of dispatch for that command. -*/ -#include "dispatch_exec.lib.h" - -// without this #define execvpe is undefined -#define _GNU_SOURCE - -#include -#include -#include -#include -#include -#include - - - -int dispatch_exec(char **argv, char **envp){ - if( !argv || !argv[0] ){ - fprintf(stderr, "argv[0] null. Null command passed into dispatch().\n"); - return -1; - } - #ifdef DEBUG - dbprintf("dispatching exec, args follow:\n"); - char **apt = argv; - while( *apt ){ - dbprintf("\t%s",*apt); - apt++; - } - dbprintf("\n"); - #endif - char *command = argv[0]; - pid_t pid = fork(); - if( pid == -1 ){ - fprintf(stderr, "fork() failed in dispatch().\n"); - return -1; - } - if( pid == 0 ){ // we are the child - execvpe(command, argv, envp); - // exec will only return if it has an error .. - perror(command); - return -1; - }else{ // we are the parent - int wstatus; - waitpid(pid, &wstatus, 0); - if(wstatus) - return -1; - else - return 0; - } -} diff --git a/module/subu-0/1_deprecated/dispatch_f.lib.c b/module/subu-0/1_deprecated/dispatch_f.lib.c deleted file mode 100644 index 5c199f5..0000000 --- a/module/subu-0/1_deprecated/dispatch_f.lib.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - Forks a new process and runs the a function in that new process. I.e. it 'spawns' a function. - - f must have the specified prototype. I.e. it accepts one void pointer and - returns a positive integer. (Negative integers are used for dispatch error codes.) - - dispatch_f_euid_egid changes to the new euid and egid before running the function. - - If the change to in euid/egid fails, the forked process exits with a negative status. - If the function has an error, it returns a positive status. A status of zero means - that all went well. - - Because f is running in a separate process, the return status is the only means - of communication going back to the calling process. - - -*/ -#define _GNU_SOURCE - -#include "dispatch_f.lib.h" -// we need the declaration for uid_t etc. -// without this #define execvpe is undefined -#define _GNU_SOURCE - -#include -#include -#include -#include - -#if INTERFACE -#include -#include -#endif - -//-------------------------------------------------------------------------------- -// dispatch_f_ctx class -// -#if INTERFACE -#define ERR_NEGATIVE_RETURN_STATUS -1 -#define ERR_DISPATCH_F_FORK -2 -#define ERR_DISPATCH_F_SETEUID -3 -#define ERR_DISPATCH_F_SETEGID -4 - -// both name and fname are static allocations -struct dispatch_f_ctx{ - char *dispatcher; // name of the dispatch function (currently "dispatch_f" or "dispatch_f_euid_egid") - char *dispatchee; // name of the function being dispatched - int err; - int status; // return value from the function -}; -#endif -dispatch_f_ctx *dispatch_f_ctx_mk(char *name, char *fname){ - dispatch_f_ctx *ctxp = malloc(sizeof(dispatch_f_ctx)); - ctxp->dispatcher = name; - ctxp->dispatchee = fname; - ctxp->err = 0; - return ctxp; -} -void dispatch_f_ctx_free(dispatch_f_ctx *ctxp){ - // no dynamic variables to be freed in ctx - free(ctxp); -} -void dispatch_f_mess(struct dispatch_f_ctx *ctxp){ - if(ctxp->err == 0) return; - switch(ctxp->err){ - case ERR_NEGATIVE_RETURN_STATUS: - fprintf(stderr, "%s, function \"%s\" broke contract with a negative return value.", ctxp->dispatcher, ctxp->dispatchee); - break; - case ERR_DISPATCH_F_FORK: - case ERR_DISPATCH_F_SETEUID: - case ERR_DISPATCH_F_SETEGID: - fprintf(stderr, "%s, ", ctxp->dispatcher); - perror(ctxp->dispatcher); - break; - } - fputc('\n', stderr); -} - -//-------------------------------------------------------------------------------- -// interface call point -dispatch_f_ctx *dispatch_f(char *fname, int (*f)(void *arg), void *f_arg){ - dispatch_f_ctx *ctxp = dispatch_f_ctx_mk("dispatch_f", fname); - #ifdef DEBUG - dbprintf("%s %s\n", ctxp->dispatcher, ctxp->dispatchee); - #endif - pid_t pid = fork(); - if( pid == -1 ){ - ctxp->err = ERR_DISPATCH_F_FORK; // we are still in the parent process - return ctxp; - } - if( pid == 0 ){ // we are the child - int status = (*f)(f_arg); // we require that f return a zero or positive value - if( status < 0 ) status = ERR_NEGATIVE_RETURN_STATUS; - exit(status); - }else{ // we are the parent - waitpid(pid, &(ctxp->status), 0); - return ctxp; - } -} - -//-------------------------------------------------------------------------------- -// interface call point -dispatch_f_ctx *dispatch_f_euid_egid(char *fname, int (*f)(void *arg), void *f_arg, uid_t euid, gid_t egid){ - dispatch_f_ctx *ctxp = dispatch_f_ctx_mk("dispatch_f_euid_egid", fname); - #ifdef DEBUG - dbprintf("%s %s as euid:%u egid:%u\n", ctxp->dispatcher, ctxp->dispatchee, euid, egid); - #endif - pid_t pid = fork(); - if( pid == -1 ){ - ctxp->err = ERR_DISPATCH_F_FORK; - return ctxp; - } - if( pid == 0 ){ // we are the child - int status; - if( seteuid(euid) == -1 ) - status = ERR_DISPATCH_F_SETEUID; - else if( setegid(egid) == -1 ) - status = ERR_DISPATCH_F_SETEGID; - else{ - status = (*f)(f_arg); - if( status < 0 ) status = ERR_NEGATIVE_RETURN_STATUS; - exit(status); - } - }else{ // we are the parent - waitpid(pid, &(ctxp->status), 0); - return ctxp; - } -} - - diff --git a/module/subu-0/1_deprecated/dispatch_useradd.lib.c b/module/subu-0/1_deprecated/dispatch_useradd.lib.c deleted file mode 100644 index 7b75291..0000000 --- a/module/subu-0/1_deprecated/dispatch_useradd.lib.c +++ /dev/null @@ -1,68 +0,0 @@ -/* -There is no C library interface to useradd(8), but if there were, this function -would be found there instead. - -*/ -#include "dispatch_useradd.lib.h" - -#include -#include -#include -#include -#include - -#if INTERFACE -#include -#include -#define ERR_DISPATCH_USERADD_ARGC 1 -#define ERR_DISPATCH_USERADD_DISPATCH 2 -#define ERR_DISPATCH_USERADD_PWREC 3 -struct dispatch_useradd_ret_t{ - uint error; - struct passwd *pw_record; -}; -#endif - - -// we have a contract with the caller that argv[1] is always the subuname -struct dispatch_useradd_ret_t dispatch_useradd(char **argv, char **envp){ - struct dispatch_useradd_ret_t ret; - { - if( !argv || !argv[0] || !argv[1]){ - fprintf(stderr,"useradd() needs a first argument as the name of the user to be made"); - ret.error = ERR_DISPATCH_USERADD_ARGC; - ret.pw_record = NULL; - return ret; - } - - char *subu_name; - { - subu_name = argv[1]; - if( dispatch_exec(argv, envp) == -1 ){ - fprintf(stderr,"%s failed\n", argv[0]); - ret.error = ERR_DISPATCH_USERADD_DISPATCH; - ret.pw_record = NULL; - return ret; - }} - - { - struct passwd *pw_record = getpwnam(subu_name); - uint count = 1; - while( !pw_record && count <= 3 ){ - #ifdef DEBUG - printf("try %u, getpwnam failed, trying again\n", count); - #endif - sleep(1); - pw_record = getpwnam(subu_name); - count++; - } - if( !pw_record ){ - ret.error = ERR_DISPATCH_USERADD_PWREC; - ret.pw_record = NULL; - return ret; - } - ret.error = 0; - ret.pw_record = pw_record; - return ret; - }}} - diff --git a/module/subu-0/1_deprecated/subu-rm-0.lib.c b/module/subu-0/1_deprecated/subu-rm-0.lib.c deleted file mode 100644 index ccad437..0000000 --- a/module/subu-0/1_deprecated/subu-rm-0.lib.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - subu-rm-0 subuname - - 1. get our uid and lookup masteru_name in /etc/passwd - 2. lookup masteru_name/subuname in config file, which gives us subu_username - 3. unmount subuland/subuname - 4. userdel subu_username - 5. rmdir subuland/subuname - - Note, as per the man page, we are not allowed to free the memory allocated by getpwid(). - -*/ -#include "subu-mk-0.lib.h" - -// without this #define we get the warning: implicit declaration of function ‘seteuid’/‘setegid’ -#define _GNU_SOURCE - -#include -#include -#include -#include -#include -#include -#include -#include - -#if INTERFACE -#include -#include -#include -#endif - -//-------------------------------------------------------------------------------- -// an instance is subu_rm_0_ctx is returned by subu_rm_0 -// -#if INTERFACE -#define ERR_SUBU_RM_0_MKDIR_SUBUHOME 1 -#define ERR_SUBU_RM_0_RMDIR_SUBUHOME 2 -#define ERR_SUBU_RM_0_SUBUNAME_MALFORMED 3 -#define ERR_SUBU_RM_0_SETUID_ROOT 4 -#define ERR_SUBU_RM_0_MASTERU_HOMELESS 5 -#define ERR_SUBU_RM_0_MALLOC 6 -#define ERR_SUBU_RM_0_CONFIG_FILE 7 -#define ERR_SUBU_RM_0_SUBUHOME_EXISTS 8 -#define ERR_SUBU_RM_0_BUG_SSS 9 -#define ERR_SUBU_RM_0_FAILED_USERADD 10 - -struct subu_rm_0_ctx{ - char *name; - char *subuland; - char *subuhome; - char *subu_username; - bool free_aux; - char *aux; - uint err; -}; -#endif -struct subu_rm_0_ctx *subu_rm_0_ctx_mk(){ - struct subu_rm_0_ctx *ctxp = malloc(sizeof(struct subu_rm_0_ctx)); - ctxp->name = "subu_rm_0"; - ctxp->subuland = 0; - ctxp->subuhome = 0; - ctxp->subu_username = 0; - ctxp->free_aux = false; - ctxp->aux = 0; -} -void subu_rm_0_ctx_free(struct subu_rm_0_ctx *ctxp){ - free(ctxp->subuland); - free(ctxp->subuhome); - free(ctxp->subu_username); - if(ctxp->free_aux) free(ctxp->aux); - free(ctxp); -} -// must be called before any system calls, otherwise perror() will be messed up -void subu_rm_0_mess(struct subu_rm_0_ctx *ctxp){ - switch(ctxp->err){ - case 0: return; - case ERR_SUBU_RM_0_MKDIR_SUBUHOME: - fprintf(stderr, "masteru could not make subuhome, \"%s\"", ctxp->subuhome); - break; - case ERR_SUBU_RM_0_SUBUNAME_MALFORMED: - fprintf(stderr, "subuname, \"%s\" is not in [ _.-a-zA-Z0-9]*", ctxp->aux); - break; - case ERR_SUBU_RM_0_SETUID_ROOT: - fprintf(stderr, "This program must be run setuid root from a user account."); - break; - case ERR_SUBU_RM_0_MASTERU_HOMELESS: - fprintf(stderr,"Masteru, \"%s\", has no home directory", ctxp->aux); - break; - case ERR_SUBU_RM_0_MALLOC: - perror(ctxp->name); - break; - case ERR_SUBU_RM_0_CONFIG_FILE: - fprintf(stderr, "config file error: %s", ctxp->aux); - break; - case ERR_SUBU_RM_0_SUBUHOME_EXISTS: - fprintf(stderr, "a file system object already exists at subuhome, \"%s\"\n", ctxp->subuhome); - break; - case ERR_SUBU_RM_0_BUG_SSS: - perror(ctxp->name); - break; - case ERR_SUBU_RM_0_FAILED_USERADD: - fprintf(stderr, "%u useradd failed\n", ctxp->subu_username); - break; - default: - fprintf(stderr, "unknown error code %d\n", ctxp->err); - } - fputc('\n', stderr); -} - -//-------------------------------------------------------------------------------- -// dispatched functions -// -// the making of subuhome is dispatched to its own process so as to give it its own uid/gid -static int masteru_mkdir_subuhome(void *arg){ - char *subuhome = (char *) arg; - if( mkdir( subuhome, subuhome_perms ) == -1 ){ // find subuhome perms in common - perror("masteru_mkdir_subuhome"); - return ERR_SUBU_RM_0_MKDIR_SUBUHOME; - } - return 0; -} -static int masteru_rmdir_subuhome(void *arg){ - char *subuhome = (char *) arg; - if( rmdir( subuhome ) == -1 ){ // find subuhome perms in common - perror("masteru_rmdir_subuhome"); - return ERR_SUBU_RM_0_RMDIR_SUBUHOME; - } - return 0; -} - -//-------------------------------------------------------------------------------- -// the public call point -struct subu_rm_0_ctx *subu_rm_0(sqlite3 *db, char *subuname){ - - struct subu_rm_0_ctx *ctxp = subu_rm_0_ctx_mk(); - - //-------------------------------------------------------------------------------- - #ifdef DEBUG - dbprintf("Checking that subuname is well formed and finding its length\n"); - #endif - size_t subuname_len; - { - int ret = allowed_subuname(subuname, &subuname_len); - if( ret == -1 ){ - ctxp->err = ERR_SUBU_RM_0_SUBUNAME_MALFORMED; - ctxp->aux = subuname; - return ctxp; - }} - - //-------------------------------------------------------------------------------- - #ifdef DEBUG - dbprintf("Checking that we are running from a user and are setuid root.\n"); - #endif - uid_t masteru_uid; - gid_t masteru_gid; - uid_t set_euid; - gid_t set_egid; - { - masteru_uid = getuid(); - masteru_gid = getgid(); - set_euid = geteuid(); - set_egid = getegid(); - #ifdef DEBUG - dbprintf("masteru_uid %u, masteru_gid %u, set_euid %u set_egid %u\n", masteru_uid, masteru_gid, set_euid, set_egid); - #endif - if( masteru_uid == 0 || set_euid != 0 ){ - ctxp->err = ERR_SUBU_RM_0_SETUID_ROOT; - return ctxp; - } - } - - //-------------------------------------------------------------------------------- - #ifdef DEBUG - dbprintf("strings masteru_name and masteru_home\n"); - #endif - - char *masteru_name; - size_t masteru_name_len; - char *masteru_home; - size_t masteru_home_len; - size_t subuland_len; - { - struct passwd *masteru_pw_record_pt = getpwuid(masteru_uid); // reading /etc/passwd - masteru_name = masteru_pw_record_pt->pw_name; - masteru_name_len = strlen(masteru_name); - #ifdef DEBUG - dbprintf("masteru_name \"%s\" %zu\n", masteru_name, masteru_name_len); - #endif - masteru_home = masteru_pw_record_pt->pw_dir; - masteru_home_len = strlen(masteru_home); - #ifdef DEBUG - dbprintf("masteru_home \"%s\" %zu\n", masteru_home, masteru_home_len); - #endif - masteru_home_len = strlen(masteru_home); - if( masteru_home_len == 0 || masteru_home[0] == '(' ){ - ctxp->err = ERR_SUBU_RM_0_MASTERU_HOMELESS; - ctxp->aux = masteru_name; // we can not free a passwd struct, or its fields. I assume then it isn't re-entrant safe. - return ctxp; - } - // char *subuland_extension = "/subuland/"; // moved to common.lib.c - size_t subuland_extension_len = strlen(subuland_extension); - ctxp->subuland = (char *)malloc( masteru_home_len + subuland_extension_len + 1 ); - if(!ctxp->subuland){ - ctxp->err = ERR_SUBU_RM_0_MALLOC; - return ctxp; - } - strcpy(ctxp->subuland, masteru_home); - strcpy(ctxp->subuland + masteru_home_len, subuland_extension); - subuland_len = masteru_home_len + subuland_extension_len; - #ifdef DEBUG - dbprintf("subuland \"%s\" %zu\n", ctxp->subuland, subuland_len); - #endif - } - - //-------------------------------------------------------------------------------- - #ifdef DEBUG - dbprintf("lookup subu_username from masteru_name/subuname in config file\n"); - #endif - char *subu_username; // this is part of ctx and must be freed - { - int ret = subu_get_masteru_subu(db, masteru_name, subuname, &subu_username); - if( ret != SQLITE_DONE ){ - printf("get failed\n"); - return 2; - } - #ifdef DEBUG - printf("subu_username: %s\n", subu_username); - #endif - - } - - //-------------------------------------------------------------------------------- - #ifdef DEBUG - dbprintf("strings subu_username and subuhome\n"); - #endif - size_t subu_username_len; - size_t subuhome_len; - { - char *ns=0; // 'ns' Number as String - char *mess=0; - if( subu_number_get( db, &ns, &mess ) != SQLITE_OK ){ - ctxp->err = ERR_SUBU_RM_0_CONFIG_FILE; - ctxp->aux = mess; - ctxp->free_aux = true; - return ctxp; - } - size_t ns_len = strlen(ns); - ctxp->subu_username = malloc(1 + ns_len + 1); - if( !ctxp->subu_username ){ - ctxp->err = ERR_SUBU_RM_0_MALLOC; - return ctxp; - } - strcpy(ctxp->subu_username, "s"); - strcpy(ctxp->subu_username + 1, ns); - subu_username_len = ns_len + 1; - #ifdef DEBUG - dbprintf("subu_username \"%s\" %zu\n", ctxp->subu_username, subu_username_len); - #endif - - subuhome_len = subuland_len + subuname_len; - ctxp->subuhome = (char *)malloc(subuhome_len + 1); - if( !ctxp->subuhome ){ - ctxp->err = ERR_SUBU_RM_0_MALLOC; - return ctxp; - } - strcpy (ctxp->subuhome, ctxp->subuland); - strcpy (ctxp->subuhome + subuland_len, subuname); - #ifdef DEBUG - dbprintf("subuhome \"%s\" %zu\n", ctxp->subuhome, subuhome_len); - #endif - } - - //-------------------------------------------------------------------------------- - // By having masteru create the subuhome, we know that masteru has rights to - // to access this directory. This will be the mount point for bindfs - { - #ifdef DEBUG - dbprintf("as masteru, making the directory \"%s\"\n", ctxp->subuhome); - #endif - struct stat st; - if( stat(ctxp->subuhome, &st) != -1 ){ - ctxp->err = ERR_SUBU_RM_0_SUBUHOME_EXISTS; - return ctxp; - } - dispatch_ctx *dfr = dispatch_f_euid_egid - ( - "masteru_mkdir_subuhome", - masteru_mkdir_subuhome, - (void *)ctxp->subuhome, - masteru_uid, - masteru_gid - ); - if( dfr->err <= ERR_DISPATCH || dfr->err == ERR_SUBU_RM_0_MKDIR_SUBUHOME ){ - #ifdef DEBUG - if( dfr->err == ERR_SUBU_RM_0_MKDIR_SUBUHOME ) - perror("mkdir"); - else - dispatch_f_mess(dfr); - #endif - ctxp->err = ERR_SUBU_RM_0_MKDIR_SUBUHOME; - return ctxp; - } - } - #ifdef DEBUG - dbprintf("masteru made directory \"%s\"\n", ctxp->subuhome); - #endif - - //-------------------------------------------------------------------------------- - // Make the subservient user account, i.e. the subu - { - #ifdef DEBUG - dbprintf("making subu \"%s\" as user \"%s\"\n", subuname, ctxp->subu_username); - #endif - #if BUG_SSS_CACHE_RUID - #ifdef DEBUG - dbprintf("setting inherited real uid to 0 to accomodate SSS_CACHE UID BUG\n"); - #endif - if( setuid(0) == -1 ){ - ctxp->err = ERR_SUBU_RM_0_BUG_SSS; - return ctxp; - } - #endif - char *command = "/usr/sbin/useradd"; - char *argv[3]; - argv[0] = command; - argv[1] = ctxp->subu_username; - argv[2] = (char *) NULL; - char *envp[1]; - envp[0] = (char *) NULL; - dispatch_ctx *dfr = dispatch_exec(argv, envp); - if( dfr->err != 0 ){ - #ifdef DEBUG - if( dfr->err <= ERR_DISPATCH ) - dispatch_f_mess(dfr); - else - perror("useradd"); - #endif - // go back and remove the directory we made in subuland - dispatch_ctx *dfr = dispatch_f_euid_egid - ( - "masteru_rmdir_subuhome", - masteru_rmdir_subuhome, - (void *)ctxp->subuhome, - masteru_uid, - masteru_gid - ); - #ifdef DEBUG - if( dfr->err <= ERR_DISPATCH || dfr->err == ERR_SUBU_RM_0_RMDIR_SUBUHOME ) - if( dfr->err == ERR_SUBU_RM_0_RMDIR_SUBUHOME ) - perror("rmdir"); - else - dispatch_f_mess(dfr); - #endif - ctxp->err = ERR_SUBU_RM_0_FAILED_USERADD; - return ctxp; - } - #ifdef DEBUG - dbprintf("added user \"%s\"\n", ctxp->subu_username); - #endif - } - - //-------------------------------------------------------------------------------- - #ifdef DEBUG - dbprintf("setting the masteru_name, subuname, subu_username relation\n"); - #endif - { - int ret = subu_put_masteru_subu(db, masteru_name, subuname, ctxp->subu_username); - if( ret != SQLITE_DONE ){ - ctxp->err = ERR_SUBU_RM_0_CONFIG_FILE; - ctxp->aux = "insert of masteru subu relation failed"; - return ctxp; - } - } - - #ifdef DEBUG - dbprintf("finished subu-mk-0(%s)\n", subuname); - #endif - ctxp->err = 0; - return ctxp; -} diff --git a/module/subu-0/1_deprecated/subudb-number-next.cli.c b/module/subu-0/1_deprecated/subudb-number-next.cli.c deleted file mode 100644 index 3373173..0000000 --- a/module/subu-0/1_deprecated/subudb-number-next.cli.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -Set or get a new maximum subu number. Currently doesn't do the setting part. - -*/ -#include "subudb-number-next.cli.h" -#include -#include -#include - -int main(int argc, char **argv){ - - if( argc != 2 ){ - fprintf(stderr, "usage: %s masteru_name \n",argv[0]); - return SUBU_ERR_ARG_CNT; - } - char *masteru_name = argv[1]; - - int rc; - sqlite3 *db; - rc = sqlite3_open_v2(DB_File, &db, SQLITE_OPEN_READWRITE, NULL); - if( rc != SQLITE_OK ){ - sqlite3_close(db); - fprintf(stderr, "error exit, could not open db file\n"); - return SUBU_ERR_DB_FILE; - } - - // read and print the current max - char *mess; - int n; - rc = subudb_number_next(db, masteru_name, &n, &mess); - if( rc == SQLITE_DONE ){ - printf("%d\n", n); - }else{ - fprintf(stderr, "subudb_number_next indicates failure by returning %d\n",rc); - fprintf(stderr, "and issues message, %s\n", sqlite3_errmsg(db)); - sqlite3_close(db); - return SUBU_ERR_DB_FILE; - } - rc = sqlite3_close(db); - if( rc != SQLITE_OK ){ - fprintf(stderr, "when closing db, %s\n", sqlite3_errmsg(db)); - return SUBU_ERR_DB_FILE; - } - return 0; -} diff --git a/module/subu-0/common.lib.c b/module/subu-0/common.lib.c deleted file mode 100644 index 9ce5a27..0000000 --- a/module/subu-0/common.lib.c +++ /dev/null @@ -1,20 +0,0 @@ - -#include "subu-common.lib.h" - -#if INTERFACE -typedef unsigned int uint; -/* - Fedora 29's sss_cache is checking the inherited uid instead of the effective - uid, so setuid root scripts will fail when calling sss_cache. - - Fedora 29's 'useradd' calls sss_cache, and useradd is called by our setuid root - program subu-mk-0. -*/ -#define BUG_SSS_CACHE_RUID 1 -#endif - -// char *DB_File = "/etc/subudb"; -char DB_File[] = "subudb"; -uint Subuhome_Perms = 0700; -uint First_Max_Subunumber = 114; -char Subuland_Extension[] = "/subuland/"; diff --git a/module/subu-0/0_makefile b/module/subu-0/deprecated/0_makefile similarity index 100% rename from module/subu-0/0_makefile rename to module/subu-0/deprecated/0_makefile diff --git a/module/subu-0/0_makefile-flags b/module/subu-0/deprecated/0_makefile-flags similarity index 100% rename from module/subu-0/0_makefile-flags rename to module/subu-0/deprecated/0_makefile-flags diff --git a/module/subu-0/1_tmp/da.lib.h b/module/subu-0/deprecated/1_tmp/da.lib.h similarity index 100% rename from module/subu-0/1_tmp/da.lib.h rename to module/subu-0/deprecated/1_tmp/da.lib.h diff --git a/module/subu-0/1_tmp/dbprintf.lib.h b/module/subu-0/deprecated/1_tmp/dbprintf.lib.h similarity index 100% rename from module/subu-0/1_tmp/dbprintf.lib.h rename to module/subu-0/deprecated/1_tmp/dbprintf.lib.h diff --git a/module/subu-0/1_tmp/dispatch.lib.h b/module/subu-0/deprecated/1_tmp/dispatch.lib.h similarity index 100% rename from module/subu-0/1_tmp/dispatch.lib.h rename to module/subu-0/deprecated/1_tmp/dispatch.lib.h diff --git a/module/subu-0/1_tmp/subu-bind-all.cli.h b/module/subu-0/deprecated/1_tmp/subu-bind-all.cli.h similarity index 100% rename from module/subu-0/1_tmp/subu-bind-all.cli.h rename to module/subu-0/deprecated/1_tmp/subu-bind-all.cli.h diff --git a/module/subu-0/1_tmp/subu-bind.cli.h b/module/subu-0/deprecated/1_tmp/subu-bind.cli.h similarity index 100% rename from module/subu-0/1_tmp/subu-bind.cli.h rename to module/subu-0/deprecated/1_tmp/subu-bind.cli.h diff --git a/module/subu-0/1_tmp/subu-common.lib.h b/module/subu-0/deprecated/1_tmp/subu-common.lib.h similarity index 100% rename from module/subu-0/1_tmp/subu-common.lib.h rename to module/subu-0/deprecated/1_tmp/subu-common.lib.h diff --git a/module/subu-0/1_tmp/subu-mk-0.cli.h b/module/subu-0/deprecated/1_tmp/subu-mk-0.cli.h similarity index 100% rename from module/subu-0/1_tmp/subu-mk-0.cli.h rename to module/subu-0/deprecated/1_tmp/subu-mk-0.cli.h diff --git a/module/subu-0/1_tmp/subu-rm-0.cli.h b/module/subu-0/deprecated/1_tmp/subu-rm-0.cli.h similarity index 100% rename from module/subu-0/1_tmp/subu-rm-0.cli.h rename to module/subu-0/deprecated/1_tmp/subu-rm-0.cli.h diff --git a/module/subu-0/1_tmp/subu.lib.h b/module/subu-0/deprecated/1_tmp/subu.lib.h similarity index 100% rename from module/subu-0/1_tmp/subu.lib.h rename to module/subu-0/deprecated/1_tmp/subu.lib.h diff --git a/module/subu-0/1_tmp/subudb-init.cli.h b/module/subu-0/deprecated/1_tmp/subudb-init.cli.h similarity index 100% rename from module/subu-0/1_tmp/subudb-init.cli.h rename to module/subu-0/deprecated/1_tmp/subudb-init.cli.h diff --git a/module/subu-0/1_tmp/subudb-number.cli.h b/module/subu-0/deprecated/1_tmp/subudb-number.cli.h similarity index 100% rename from module/subu-0/1_tmp/subudb-number.cli.h rename to module/subu-0/deprecated/1_tmp/subudb-number.cli.h diff --git a/module/subu-0/1_tmp/subudb-rel-get.cli.h b/module/subu-0/deprecated/1_tmp/subudb-rel-get.cli.h similarity index 100% rename from module/subu-0/1_tmp/subudb-rel-get.cli.h rename to module/subu-0/deprecated/1_tmp/subudb-rel-get.cli.h diff --git a/module/subu-0/1_tmp/subudb-rel-put.cli.h b/module/subu-0/deprecated/1_tmp/subudb-rel-put.cli.h similarity index 100% rename from module/subu-0/1_tmp/subudb-rel-put.cli.h rename to module/subu-0/deprecated/1_tmp/subudb-rel-put.cli.h diff --git a/module/subu-0/1_tmp/subudb-rel-rm.cli.h b/module/subu-0/deprecated/1_tmp/subudb-rel-rm.cli.h similarity index 100% rename from module/subu-0/1_tmp/subudb-rel-rm.cli.h rename to module/subu-0/deprecated/1_tmp/subudb-rel-rm.cli.h diff --git a/module/subu-0/1_tmp/subudb-subus.cli.h b/module/subu-0/deprecated/1_tmp/subudb-subus.cli.h similarity index 100% rename from module/subu-0/1_tmp/subudb-subus.cli.h rename to module/subu-0/deprecated/1_tmp/subudb-subus.cli.h diff --git a/module/subu-0/1_tmp/subudb.lib.h b/module/subu-0/deprecated/1_tmp/subudb.lib.h similarity index 100% rename from module/subu-0/1_tmp/subudb.lib.h rename to module/subu-0/deprecated/1_tmp/subudb.lib.h diff --git a/module/subu-0/1_doc/to_do.txt b/module/subu-0/doc/to_do.txt similarity index 100% rename from module/subu-0/1_doc/to_do.txt rename to module/subu-0/doc/to_do.txt diff --git a/module/dispatch/#makefile# b/module/subu-0/makefile similarity index 93% rename from module/dispatch/#makefile# rename to module/subu-0/makefile index d8fe923..ab3ffe5 100644 --- a/module/dispatch/#makefile# +++ b/module/subu-0/makefile @@ -35,8 +35,9 @@ dep: .PHONY: lib lib: $(MAKE) $@ + cp $(SRCDIR)/dispatch.lib.h $(INCDIR)/dispatch.h -o%:: +%:: $(MAKE) $@ diff --git a/module/subu-0/makefile-flags b/module/subu-0/makefile-flags new file mode 100644 index 0000000..854b84f --- /dev/null +++ b/module/subu-0/makefile-flags @@ -0,0 +1,33 @@ + +MODULE=dispatch + +DEPRDIR=deprecated +DOCDIR=doc +EXECDIR=exec +INCDIR=include +LIBDIR=lib +SHAREDIR=../share +SRCDIR=tmp +TESTDIR=test +TMPDIR=tmp +TOOLDIR=$(realpath $(PROJECT_SUBU)/tool) +TRCDIR=trc +TRYDIR=try + +DEPFILE=$(TMPDIR)/makefile-trc.deps +LIBFILE=$(LIBDIR)/lib$(MODULE).a +INCFILE=$(INCDIR)/$(MODULE).h + +# 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 + +# compiler and flags +C=gcc +CFLAGS=-std=gnu11 -fPIC -I. -I../share/include -ggdb -Werror -DDEBUG -DDEBUGDB +#CFLAGS=-std=gnu11 -fPIC -I. -I../share/include -Werror + +LINKFLAGS=-L1_lib -lda + + + diff --git a/module/subu-0/1_tests/0_makefile b/module/subu-0/test/0_makefile similarity index 100% rename from module/subu-0/1_tests/0_makefile rename to module/subu-0/test/0_makefile diff --git a/module/subu-0/1_tests/0_makefile_flags b/module/subu-0/test/0_makefile_flags similarity index 100% rename from module/subu-0/1_tests/0_makefile_flags rename to module/subu-0/test/0_makefile_flags diff --git a/module/subu-0/1_tests/1_tmp/makefile_deps b/module/subu-0/test/1_tmp/makefile_deps similarity index 100% rename from module/subu-0/1_tests/1_tmp/makefile_deps rename to module/subu-0/test/1_tmp/makefile_deps diff --git a/module/subu-0/1_tests/da.cli.c b/module/subu-0/test/da.cli.c similarity index 100% rename from module/subu-0/1_tests/da.cli.c rename to module/subu-0/test/da.cli.c diff --git a/module/subu-0/1_tests/libtests.a b/module/subu-0/test/libtests.a similarity index 100% rename from module/subu-0/1_tests/libtests.a rename to module/subu-0/test/libtests.a diff --git a/module/subu-0/trc/common.lib.c b/module/subu-0/trc/common.lib.c new file mode 100644 index 0000000..fec4853 --- /dev/null +++ b/module/subu-0/trc/common.lib.c @@ -0,0 +1,29 @@ +#tranche common.lib.c +#include "common.lib.h" + +#tranche common.lib.h + typedef unsigned int uint; + /* + Fedora 29's sss_cache is checking the inherited uid instead of the effective + uid, so setuid root scripts will fail when calling sss_cache. + + Fedora 29's 'useradd' calls sss_cache, and useradd is called by our setuid root + program subu-mk-0. + */ + #define BUG_SSS_CACHE_RUID 1 +#tranche-end + +#tranche common.lib.h + // extern char *DB_File; + extern char DB_File[]; + extern uint Subuhome_Perms; + extern uint First_Max_Subunumber; + extern char Subuland_Extension[]; +#tranche-end +// char *DB_File = "/etc/subudb"; +char DB_File[] = "subudb"; +uint Subuhome_Perms = 0700; +uint First_Max_Subunumber = 114; +char Subuland_Extension[] = "/subuland/"; + +#tranche-end diff --git a/module/subu-0/db.lib.c b/module/subu-0/trc/db.lib.c similarity index 100% rename from module/subu-0/db.lib.c rename to module/subu-0/trc/db.lib.c diff --git a/module/subu-0/subu-bind-all.cli.c b/module/subu-0/trc/subu-bind-all.cli.c similarity index 100% rename from module/subu-0/subu-bind-all.cli.c rename to module/subu-0/trc/subu-bind-all.cli.c diff --git a/module/subu-0/subu-bind.cli.c b/module/subu-0/trc/subu-bind.cli.c similarity index 100% rename from module/subu-0/subu-bind.cli.c rename to module/subu-0/trc/subu-bind.cli.c diff --git a/module/subu-0/subu-mk-0.cli.c b/module/subu-0/trc/subu-mk-0.cli.c similarity index 100% rename from module/subu-0/subu-mk-0.cli.c rename to module/subu-0/trc/subu-mk-0.cli.c diff --git a/module/subu-0/subu-rm-0.cli.c b/module/subu-0/trc/subu-rm-0.cli.c similarity index 100% rename from module/subu-0/subu-rm-0.cli.c rename to module/subu-0/trc/subu-rm-0.cli.c diff --git a/module/subu-0/subu.lib.c b/module/subu-0/trc/subu.lib.c similarity index 91% rename from module/subu-0/subu.lib.c rename to module/subu-0/trc/subu.lib.c index 988bd28..cd6bc2f 100644 --- a/module/subu-0/subu.lib.c +++ b/module/subu-0/trc/subu.lib.c @@ -283,7 +283,7 @@ int subu_mk_0(char **mess, sqlite3 *db, char *subuname){ rc = allowed_subuname(mess, subuname, &subuname_len); if(rc) return rc; #ifdef DEBUG - dbprintf("subuname is well formed\n"); + debug_printf("subuname is well formed\n"); #endif //-------------------------------------------------------------------------------- @@ -297,7 +297,7 @@ int subu_mk_0(char **mess, sqlite3 *db, char *subuname){ set_euid = geteuid(); set_egid = getegid(); #ifdef DEBUG - dbprintf("masteru_uid %u, masteru_gid %u, set_euid %u set_egid %u\n", masteru_uid, masteru_gid, set_euid, set_egid); + debug_printf("masteru_uid %u, masteru_gid %u, set_euid %u set_egid %u\n", masteru_uid, masteru_gid, set_euid, set_egid); #endif if( masteru_uid == 0 || set_euid != 0 ) return SUBU_ERR_SETUID_ROOT; } @@ -324,7 +324,7 @@ int subu_mk_0(char **mess, sqlite3 *db, char *subuname){ ; if(rc) RETURN(&resources, rc); #ifdef DEBUG - dbprintf("subu_username, subuland, subuhome: \"%s\"\"%s\"\"%s\"\n", subu_username, subuland, subuhome); + debug_printf("subu_username, subuland, subuhome: \"%s\"\"%s\"\"%s\"\n", subu_username, subuland, subuhome); #endif //-------------------------------------------------------------------------------- @@ -353,18 +353,18 @@ int subu_mk_0(char **mess, sqlite3 *db, char *subuname){ } } #ifdef DEBUG - dbprintf("made directory \"%s\"\n", subuhome); + debug_printf("made directory \"%s\"\n", subuhome); #endif //-------------------------------------------------------------------------------- // Make the subservient user account, i.e. the subu { #ifdef DEBUG - dbprintf("making subu \"%s\" as user \"%s\"\n", subuname, subu_username); + debug_printf("making subu \"%s\" as user \"%s\"\n", subuname, subu_username); #endif #if BUG_SSS_CACHE_RUID #ifdef DEBUG - dbprintf("setting inherited real uid to 0 to accomodate SSS_CACHE UID BUG\n"); + debug_printf("setting inherited real uid to 0 to accomodate SSS_CACHE UID BUG\n"); #endif if( setuid(0) == -1 ) RETURN(&resources, SUBU_ERR_BUG_SSS); #endif @@ -396,13 +396,13 @@ int subu_mk_0(char **mess, sqlite3 *db, char *subuname){ RETURN(&resources, SUBU_ERR_FAILED_USERADD); } #ifdef DEBUG - dbprintf("added user \"%s\"\n", subu_username); + debug_printf("added user \"%s\"\n", subu_username); #endif } //-------------------------------------------------------------------------------- #ifdef DEBUG - dbprintf("setting the masteru_name, subuname, subu_username relation\n"); + debug_printf("setting the masteru_name, subuname, subu_username relation\n"); #endif { int rc = subudb_Masteru_Subu_put(db, masteru_name, subuname, subu_username); @@ -412,7 +412,7 @@ int subu_mk_0(char **mess, sqlite3 *db, char *subuname){ } } #ifdef DEBUG - dbprintf("finished subu-mk-0(%s)\n", subuname); + debug_printf("finished subu-mk-0(%s)\n", subuname); #endif RETURN(&resources, 0); } @@ -430,7 +430,7 @@ int subu_rm_0(char **mess, sqlite3 *db, char *subuname){ rc = allowed_subuname(mess, subuname, &subuname_len); if(rc) return rc; #ifdef DEBUG - dbprintf("subuname is well formed\n"); + debug_printf("subuname is well formed\n"); #endif //-------------------------------------------------------------------------------- @@ -444,7 +444,7 @@ int subu_rm_0(char **mess, sqlite3 *db, char *subuname){ set_euid = geteuid(); set_egid = getegid(); #ifdef DEBUG - dbprintf("masteru_uid %u, masteru_gid %u, set_euid %u set_egid %u\n", masteru_uid, masteru_gid, set_euid, set_egid); + debug_printf("masteru_uid %u, masteru_gid %u, set_euid %u set_egid %u\n", masteru_uid, masteru_gid, set_euid, set_egid); #endif if( masteru_uid == 0 || set_euid != 0 ) return SUBU_ERR_SETUID_ROOT; } @@ -468,7 +468,7 @@ int subu_rm_0(char **mess, sqlite3 *db, char *subuname){ ; if(rc) RETURN(&resources, rc); #ifdef DEBUG - dbprintf("masteru_home, subuhome: \"%s\", \"%s\"\n", masteru_home, subuhome); + debug_printf("masteru_home, subuhome: \"%s\", \"%s\"\n", masteru_home, subuhome); #endif //-------------------------------------------------------------------------------- @@ -496,7 +496,7 @@ int subu_rm_0(char **mess, sqlite3 *db, char *subuname){ RETURN(&resources, SUBU_ERR_DB_FILE); } #ifdef DEBUG - dbprintf("removed the masteru_name, subuname, subu_username relation\n"); + debug_printf("removed the masteru_name, subuname, subu_username relation\n"); #endif rc = db_commit(db); @@ -515,7 +515,7 @@ int subu_rm_0(char **mess, sqlite3 *db, char *subuname){ // { #ifdef DEBUG - dbprintf("as masteru, removing the directory \"%s\"\n", subuhome); + debug_printf("as masteru, removing the directory \"%s\"\n", subuhome); #endif int dispatch_err = dispatch_f_euid_egid ( @@ -538,11 +538,11 @@ int subu_rm_0(char **mess, sqlite3 *db, char *subuname){ // Delete the subservient user account { #ifdef DEBUG - dbprintf("deleting user \"%s\"\n", subu_username); + debug_printf("deleting user \"%s\"\n", subu_username); #endif #if BUG_SSS_CACHE_RUID #ifdef DEBUG - dbprintf("setting inherited real uid to 0 to accomodate SSS_CACHE UID BUG\n"); + debug_printf("setting inherited real uid to 0 to accomodate SSS_CACHE UID BUG\n"); #endif if( setuid(0) == -1 ){ RETURN(&resources, SUBU_ERR_BUG_SSS); @@ -565,12 +565,12 @@ int subu_rm_0(char **mess, sqlite3 *db, char *subuname){ RETURN(&resources, SUBU_ERR_FAILED_USERDEL); } #ifdef DEBUG - dbprintf("deleted user \"%s\"\n", subu_username); + debug_printf("deleted user \"%s\"\n", subu_username); #endif } #ifdef DEBUG - dbprintf("finished subu-rm-0(%s)\n", subuname); + debug_printf("finished subu-rm-0(%s)\n", subuname); #endif RETURN(&resources, 0); } @@ -621,7 +621,7 @@ int subu_bind(char **mess, char *masteru_name, char *subu_username, char *subuho RETURN(&resources, SUBU_ERR_BIND); } #ifdef DEBUG - dbprintf("mapped \"%s\" as \"%s\"\n", subu_user_home, subuhome); + debug_printf("mapped \"%s\" as \"%s\"\n", subu_user_home, subuhome); #endif RETURN(&resources, 0); } @@ -644,7 +644,7 @@ int subu_bind_all(char **mess, sqlite3 *db){ set_euid = geteuid(); set_egid = getegid(); #ifdef DEBUG - dbprintf("masteru_uid %u, masteru_gid %u, set_euid %u set_egid %u\n", masteru_uid, masteru_gid, set_euid, set_egid); + debug_printf("masteru_uid %u, masteru_gid %u, set_euid %u set_egid %u\n", masteru_uid, masteru_gid, set_euid, set_egid); #endif if( masteru_uid == 0 || set_euid != 0 ) return SUBU_ERR_SETUID_ROOT; } @@ -665,14 +665,14 @@ int subu_bind_all(char **mess, sqlite3 *db){ if(rc) RETURN(&resources, rc); #ifdef DEBUG if(masteru_name) - dbprintf("masteru_name: \"%s\"", masteru_name); + debug_printf("masteru_name: \"%s\"", masteru_name); else - dbprintf("masteru_name unknown"); + debug_printf("masteru_name unknown"); if(subuland) - dbprintf("subuland: \"%s\"", subuland); + debug_printf("subuland: \"%s\"", subuland); else - dbprintf("subuland unknown"); - dbprintf("\n"); + debug_printf("subuland unknown"); + debug_printf("\n"); #endif //-------------------------------------------------------------------------------- @@ -692,9 +692,9 @@ int subu_bind_all(char **mess, sqlite3 *db){ rc = mk_subuhome(subuland, pt->subuname, &subuhome); #ifdef DEBUG if(subuhome) - dbprintf("subuhome: \"%s\"\n", subuhome); + debug_printf("subuhome: \"%s\"\n", subuhome); else - dbprintf("subuhome unknown \n"); + debug_printf("subuhome unknown \n"); #endif if(!rc) rc = subu_bind(NULL, masteru_name, pt->subu_username, subuhome); if(rc) err_cnt++; diff --git a/module/subu-0/subudb-init.cli.c b/module/subu-0/trc/subudb-init.cli.c similarity index 100% rename from module/subu-0/subudb-init.cli.c rename to module/subu-0/trc/subudb-init.cli.c diff --git a/module/subu-0/subudb-number.cli.c b/module/subu-0/trc/subudb-number.cli.c similarity index 100% rename from module/subu-0/subudb-number.cli.c rename to module/subu-0/trc/subudb-number.cli.c diff --git a/module/subu-0/subudb-rel-get.cli.c b/module/subu-0/trc/subudb-rel-get.cli.c similarity index 100% rename from module/subu-0/subudb-rel-get.cli.c rename to module/subu-0/trc/subudb-rel-get.cli.c diff --git a/module/subu-0/subudb-rel-put.cli.c b/module/subu-0/trc/subudb-rel-put.cli.c similarity index 100% rename from module/subu-0/subudb-rel-put.cli.c rename to module/subu-0/trc/subudb-rel-put.cli.c diff --git a/module/subu-0/subudb-rel-rm.cli.c b/module/subu-0/trc/subudb-rel-rm.cli.c similarity index 100% rename from module/subu-0/subudb-rel-rm.cli.c rename to module/subu-0/trc/subudb-rel-rm.cli.c diff --git a/module/subu-0/subudb-subus.cli.c b/module/subu-0/trc/subudb-subus.cli.c similarity index 100% rename from module/subu-0/subudb-subus.cli.c rename to module/subu-0/trc/subudb-subus.cli.c diff --git a/module/subu-0/1_try/split.c b/module/subu-0/try/split.c similarity index 100% rename from module/subu-0/1_try/split.c rename to module/subu-0/try/split.c diff --git a/module/subu-0/1_try/split_arg.c b/module/subu-0/try/split_arg.c similarity index 100% rename from module/subu-0/1_try/split_arg.c rename to module/subu-0/try/split_arg.c diff --git a/module/subu-0/1_try/subudb b/module/subu-0/try/subudb similarity index 100% rename from module/subu-0/1_try/subudb rename to module/subu-0/try/subudb diff --git a/module/subu-0/1_try/voidptr.c b/module/subu-0/try/voidptr.c similarity index 100% rename from module/subu-0/1_try/voidptr.c rename to module/subu-0/try/voidptr.c diff --git a/module/temp b/module/temp deleted file mode 100644 index 7b6ed6e..0000000 --- a/module/temp +++ /dev/null @@ -1,10 +0,0 @@ -sed -i -e 's/makefile_cc/makefile-cc/g' ./db/0_makefile -sed -i -e 's/makefile_cc/makefile-cc/g' ./subu-0/1_tests/0_makefile -sed -i -e 's/makefile_cc/makefile-cc/g' ./subu-0/0_makefile -sed -i -e 's/makefile_cc/makefile-cc/g' ./tranche/deprecated/0_makefile -sed -i -e 's/makefile_cc/makefile-cc/g' ./tranche/makefile-flags -sed -i -e 's/makefile_cc/makefile-cc/g' ./tranche/makefile-flags -sed -i -e 's/makefile_cc/makefile-cc/g' ./da/test/makefile-flags -sed -i -e 's/makefile_cc/makefile-cc/g' ./da/test/makefile-flags -sed -i -e 's/makefile_cc/makefile-cc/g' ./da/makefile-flags -sed -i -e 's/makefile_cc/makefile-cc/g' ./da/makefile-flags diff --git a/module/tranche/makefile b/module/tranche/makefile index 24e7cfa..2c21909 100644 --- a/module/tranche/makefile +++ b/module/tranche/makefile @@ -17,7 +17,7 @@ dep: .PHONY: lib lib: $(MAKE) $@ - cp src/tranche.lib.h include/tranche.h + cp $(SRCDIR)/tranche.lib.h include/tranche.h .PHONY: exec exec: diff --git a/module/tranche/src/tranche.lib.c b/module/tranche/src/tranche.lib.c index 787ff4f..65e66c1 100644 --- a/module/tranche/src/tranche.lib.c +++ b/module/tranche/src/tranche.lib.c @@ -203,7 +203,13 @@ void tranche_make(FILE *src_file, char *src_name, int mfile_fd, char *tdir){ da_free_elements(tap); da_free(tap); - // output acction line ---------------------------------------- + // output action lines ---------------------------------------- + da_rewind(dlap); // reuse the line buffer + da_push(dlap, &tab); + da_string_push(dlap, "for i in $@; do rm $$i || true; done"); + da_push(dlap, &newline); + write(mfile_fd, dlap->base, dlap->end - dlap->base); + da_rewind(dlap); // reuse the line buffer da_push(dlap, &tab); da_string_push(dlap, "tranche $<"); @@ -214,7 +220,7 @@ void tranche_make(FILE *src_file, char *src_name, int mfile_fd, char *tdir){ da_push(dlap, &newline); da_push(dlap, &newline); write(mfile_fd, dlap->base, dlap->end - dlap->base); - da_free(dlap); + da_free(dlap); return; } diff --git a/tool/bin/tranche b/tool/bin/tranche index 79da91b20f72dd494d8eec6b09e73e87bc90e4bc..31fdc5d80814132b413af368403f7ea0baf784a7 100755 GIT binary patch delta 1423 zcmZ9MdrVtZ9LLYOZJ}-UXbp@OOm7Dby@*gALU}n$c&t8RN(@A{`I`SC)SI-+OOuxF;~yEN;^n1O>`F`|G7CSX z6)%pQeJM5Ty~^|1$8raKI*ZQufvi>atkJq87juuFiO4S-OVdehH>&e*C<=Xkdj=KR zjcpJ9qA2eD4N>>L@u=&!Cmv+&yAY3Fj3uK7%Vu>9(edc6MTGY5>0|!fMDD?| zZ<9NZ#&`BN_bpo{^6y_HZcpQbhwSO<9q?NDv}q`sG=}4r>xvTm^y9T+J!AB^-ISru zWvtnKuprKd9>|+<@4cptDs%EHcCI~C6zlES?z47UJG-nlSGBcmyVbYNYO{4(ySuG^ z-?Q!UP**$i`=01}@~L*Kt%g|({B4~+E8|(J>Nd_;KALy)lA?@a?!K%jec&!|2rQgZ zlnD6d6-9}Gw?KoySniCX6oIZ8rC0G_@)!bMa0m>7Ux8!b&RH0MZ-Fsz5;Uk7Ynp=r z_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a=M*<8E zfqsxZKmyPYPU>?;b5E}0C6wt}x$1eGGm^v}E3^vl7(M06<=;}h%cA`AlMs7#uP4LY zCq1(~McT706@QDzVEP#E(-d-9col`AVAFHk*nAN4@Lrx0`-g`pZvL9>V#TewV0Og&H+)kC*Z4|FGmpyL#VVtuhiS-@=# z;AivjJPgMqeGmG%ZNNbuAf==xIe@!L*0vk#k||nNBH0~UUirZklO10K{c$?zy{dAP zYL8EC4()bTH8O#|dr?U_S!`P4s*DvyC;LxU8zi1iXHOULPig9O1-FwD RtdP?BXn(Mrk5MR?`!AEc4|f0n delta 1247 zcmZA1Z)_7~90%~{c{;YXsar=j{%qNJ zHn5w{Vd{#|{h)>yGe%8tWJKh)hy=qQv&`aN4J8`Pw#0$0t6CHx8s+?6M=la(G^}gIej8=*p zB?}d6FP3?STRv#nvihm;SW|1v-Ju!{kwW7c*~gU0%Rcq(;^JlY{#W~0c#Sf+Bc&YP zc+JF^5}iza^M|G>gS+~2-O=lM*A?>0rQ&{;d~yj-(O%hMt4ZmjFcGJ({i10{lV5bW ziljGkcTpty=wo^1vSW`jwo5r&qr0=&epBhs7*j{o8F_U9wV684uIu8x;r)B|J^OsS zt?Dsms|i0B+;3xymm9XUamE~|c5Ft|KE(0-tfn1=C3CnKyb7ma*-cH$z?Y##F!mmF z!t<~heg{La@Rp{mgw(_Dm>-( zHmtE*Z#5QJtzaGYgXlxi+*XBb#Gax(o@#!Vq8>@C`GHP(D)}>%^hi8JX=DePY9-!I zc4Q9)kS8cuD~XDEdaJflRL|3?+Dh)FB+k4;Y2;sI+9>gRWJlU5fOJq0*+5a`2#p|J zlti{u8W|x|oy0#SJMvcwAX_MioTDi6O&US|LrLUIlt$hl(*E8fdh?JSG9IxXE`t!J#TWNE` RE3yOBlW5={(PxS3e*r|=$7}!q diff --git a/tool/bin/tranche-target b/tool/bin/tranche-target index 29765dfa599a1ce62a1d2c4a7bb1031a6308210a..4415c1a2fd2aa769dfdf5de36961149d6ef71862 100755 GIT binary patch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