From 3bbbb7797ec8d375fba756cb8e54d0e3d9add4e5 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sun, 18 May 2025 03:07:13 -0700 Subject: [PATCH] improve bin/cvt-submission.sh, use umask 0022 for new year and new dir --- bin/cvt-submission.sh | 17 +++++++++++------ bin/new-dir.sh | 7 ++++++- bin/new-year.sh | 7 ++++++- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/bin/cvt-submission.sh b/bin/cvt-submission.sh index abe4cfc73..8ff0035f6 100755 --- a/bin/cvt-submission.sh +++ b/bin/cvt-submission.sh @@ -124,7 +124,7 @@ export LC_ALL="C" # set variables referenced in the usage message # -export VERSION="2.0.4 2025-05-18" +export VERSION="2.0.5 2025-05-18" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -848,6 +848,11 @@ fi export ENTRY_PATH="$1" +# set umask to avoid group writable files +# +umask 0022 + + # if -i input_data, replace stdin with the input data file # if [[ -n $INPUT_DATA_FILE ]]; then @@ -1424,21 +1429,21 @@ fi # if [[ $V_FLAG -ge 1 ]]; then echo "$0: debug[1]: about to run: $CHKENTRY_TOOL -v 1" \ - "-i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig" \ + "-i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path" \ "-- $YYYY_DIR" 1>&2 - "$CHKENTRY_TOOL" -v 1 -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -- "$YYYY_DIR" + "$CHKENTRY_TOOL" -v 1 -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path -- "$YYYY_DIR" status="$?" if [[ $status -ne 0 ]]; then - echo "$0: ERROR: $CHKENTRY_TOOL -v 1 -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig" \ + echo "$0: ERROR: $CHKENTRY_TOOL -v 1 -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path" \ "-- $YYYY_DIR failed," \ "error code: $status" 1>&2 exit 7 fi else - "$CHKENTRY_TOOL" -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -- "$YYYY_DIR" + "$CHKENTRY_TOOL" -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path -- "$YYYY_DIR" status="$?" if [[ $status -ne 0 ]]; then - echo "$0: $CHKENTRY_TOOL -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig" \ + echo "$0: $CHKENTRY_TOOL -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path" \ "-- $YYYY_DIR failed," \ "error code: $status" 1>&2 exit 7 diff --git a/bin/new-dir.sh b/bin/new-dir.sh index e9744b945..b0dae9772 100755 --- a/bin/new-dir.sh +++ b/bin/new-dir.sh @@ -107,7 +107,7 @@ export LC_ALL="C" # set variables referenced in the usage message # -export VERSION="2.0.0 2025-03-13" +export VERSION="2.0.1 2025-05-18" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -214,6 +214,11 @@ fi export ENTRY_PATH="$1" +# set umask to avoid group writable files +# +umask 0022 + + # verify that we have a topdir directory # REPO_NAME=$(basename "$REPO_TOP_URL") diff --git a/bin/new-year.sh b/bin/new-year.sh index 211617735..5bc2fdd37 100755 --- a/bin/new-year.sh +++ b/bin/new-year.sh @@ -106,7 +106,7 @@ export LC_ALL="C" # set variables referenced in the usage message # -export VERSION="2.0.0 2025-03-13" +export VERSION="2.0.1 2025-05-18" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -318,6 +318,11 @@ else fi +# set umask to avoid group writable files +# +umask 0022 + + # verify that we have a topdir directory # REPO_NAME=$(basename "$REPO_TOP_URL")