From fd8bfb7fa37228c2c75d896124c99a4518e93b1e Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 19 Mar 2015 23:52:12 +0000 Subject: [PATCH] replace dbus-uuidgen by /dev/urandom based solution svn path=/trunk/; revision=58 --- actions/new_attendee.sh | 2 +- actions/new_course.sh | 2 +- constants.sh | 4 ++++ templates/edit_attendee.sh | 2 +- templates/edit_course.sh | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/actions/new_attendee.sh b/actions/new_attendee.sh index c6d0301..72581a7 100644 --- a/actions/new_attendee.sh +++ b/actions/new_attendee.sh @@ -24,7 +24,7 @@ filter="&filter=$_REF[\"filter\"]" filtertype="&filtertype=$_REF[\"filtertype\"]" order="&order=$_REF[\"order\"]" -uid=$(dbus-uuidgen) +uid=$(uuidgenerator) card="${uid}.vcf" tempfile="$_DATA/temp/$card" diff --git a/actions/new_course.sh b/actions/new_course.sh index 7cd0826..e33f681 100644 --- a/actions/new_course.sh +++ b/actions/new_course.sh @@ -19,7 +19,7 @@ cgi_post -uid=$(dbus-uuidgen) +uid=$(uuidgenerator) course="${uid}.ics" tzid=$(cat /etc/timezone) diff --git a/constants.sh b/constants.sh index 1cce13c..3d4e648 100644 --- a/constants.sh +++ b/constants.sh @@ -18,3 +18,7 @@ # along with Confetti. If not, see . VCF_FIELDS=(PHOTO LOGO FN NICKNAME SOUND GENDER KIND TITLE ROLE ORG MEMBER CATEGORIES ANNIVERSARY BDAY EMAIL TEL IMPP ADR URL LANG NOTE RELATED X-ZACK-JOINDATE X-ZACK-LEAVEDATE) + +uuidgenerator(){ + head -c16 /dev/urandom |sha1sum - |cut -c1-32 +} diff --git a/templates/edit_attendee.sh b/templates/edit_attendee.sh index fd0e09c..e505012 100755 --- a/templates/edit_attendee.sh +++ b/templates/edit_attendee.sh @@ -30,7 +30,7 @@ n_post="$(echo "$values[N]" |sed -rn 's:^([^;]*;){4} *([^;]*)*$:\2:p')" SUP_FIELDS=(N NICKNAME GENDER BDAY X-ZACK-JOINDATE X-ZACK-LEAVEDATE EMAIL TEL IMPP ADR URL NOTE) -[ -z "$values[UID]" ] && values[UID]="$(dbus-uuidgen)" +[ -z "$values[UID]" ] && values[UID]="$(uuidgenerator)" echo '
' echo '
' diff --git a/templates/edit_course.sh b/templates/edit_course.sh index 8aa9d56..67e0511 100755 --- a/templates/edit_course.sh +++ b/templates/edit_course.sh @@ -16,7 +16,7 @@ # along with Confetti. If not, see . SUP_FIELDS=(SUMMARY COMMENT) -[ -z "$values[UID]" ] && values[UID]="$(dbus-uuidgen)" +[ -z "$values[UID]" ] && values[UID]="$(uuidgenerator)" dtstart="$values[DTSTART]" [ -z "$dtstart" ] && dtstart=$(date +%Y%m%dT%H%M%S) -- 2.39.2