From f43a08f91c873fbf4059e112fcbcf14f6ee2c28d Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Sun, 24 Feb 2019 00:24:09 +0100 Subject: [PATCH] 2_bin/gitadd script to do a make clean before an add --- bin/gitadd | 5 +++++ makefile | 4 ++-- src/5_scratch/common.lib.h | 4 ++++ src/5_scratch/dbprintf.lib.h | 3 +++ src/5_scratch/dispatch_exec.lib.h | 4 ++++ src/5_scratch/dispatch_f.lib.h | 5 +++++ src/5_scratch/dispatch_useradd.lib.h | 16 +++++++++++++++ src/5_scratch/subu-config.lib.h | 9 +++++++++ src/5_scratch/subu-init.cli.h | 10 ++++++++++ src/5_scratch/subu-mk-0.cli.h | 8 ++++++++ src/5_scratch/subu-mk-0.lib.h | 29 ++++++++++++++++++++++++++++ src/5_scratch/subu-number.cli.h | 10 ++++++++++ 12 files changed, 105 insertions(+), 2 deletions(-) create mode 100755 bin/gitadd create mode 100644 src/5_scratch/common.lib.h create mode 100644 src/5_scratch/dbprintf.lib.h create mode 100644 src/5_scratch/dispatch_exec.lib.h create mode 100644 src/5_scratch/dispatch_f.lib.h create mode 100644 src/5_scratch/dispatch_useradd.lib.h create mode 100644 src/5_scratch/subu-config.lib.h create mode 100644 src/5_scratch/subu-init.cli.h create mode 100644 src/5_scratch/subu-mk-0.cli.h create mode 100644 src/5_scratch/subu-mk-0.lib.h create mode 100644 src/5_scratch/subu-number.cli.h diff --git a/bin/gitadd b/bin/gitadd new file mode 100755 index 0000000..7097d77 --- /dev/null +++ b/bin/gitadd @@ -0,0 +1,5 @@ +#!/bin/bash +set -x +make clean +git add "$@" + diff --git a/makefile b/makefile index f5487c9..f77a99c 100755 --- a/makefile +++ b/makefile @@ -3,14 +3,14 @@ subdirectories=src all : $(foreach dir, $(subdirectories), \ - if [ -f $(dir)/Makefile ]; then \ + if [ -f $(dir)/makefile ]; then \ make -C $(dir) all && make -C $(dir) install; \ fi;\ ) clean : $(foreach dir, $(subdirectories), \ - if [ -f ./$(dir)/Makefile ]; then \ + if [ -f ./$(dir)/makefile ]; then \ make -C $(dir) clean; \ fi;\ ) diff --git a/src/5_scratch/common.lib.h b/src/5_scratch/common.lib.h new file mode 100644 index 0000000..6b7f7c9 --- /dev/null +++ b/src/5_scratch/common.lib.h @@ -0,0 +1,4 @@ +/* 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 new file mode 100644 index 0000000..3056cf6 --- /dev/null +++ b/src/5_scratch/dbprintf.lib.h @@ -0,0 +1,3 @@ +/* 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 new file mode 100644 index 0000000..877a38e --- /dev/null +++ b/src/5_scratch/dispatch_exec.lib.h @@ -0,0 +1,4 @@ +/* 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 new file mode 100644 index 0000000..994592d --- /dev/null +++ b/src/5_scratch/dispatch_f.lib.h @@ -0,0 +1,5 @@ +/* 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 new file mode 100644 index 0000000..0ce7e9d --- /dev/null +++ b/src/5_scratch/dispatch_useradd.lib.h @@ -0,0 +1,16 @@ +/* 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/5_scratch/subu-config.lib.h b/src/5_scratch/subu-config.lib.h new file mode 100644 index 0000000..c359b52 --- /dev/null +++ b/src/5_scratch/subu-config.lib.h @@ -0,0 +1,9 @@ +/* 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 new file mode 100644 index 0000000..46bfd20 --- /dev/null +++ b/src/5_scratch/subu-init.cli.h @@ -0,0 +1,10 @@ +/* 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 new file mode 100644 index 0000000..075b350 --- /dev/null +++ b/src/5_scratch/subu-mk-0.cli.h @@ -0,0 +1,8 @@ +/* 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 new file mode 100644 index 0000000..82c7e14 --- /dev/null +++ b/src/5_scratch/subu-mk-0.lib.h @@ -0,0 +1,29 @@ +/* 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/5_scratch/subu-number.cli.h b/src/5_scratch/subu-number.cli.h new file mode 100644 index 0000000..759d808 --- /dev/null +++ b/src/5_scratch/subu-number.cli.h @@ -0,0 +1,10 @@ +/* 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); -- 2.20.1