]> git.plutz.net Git - lobster/commitdiff
replace dbus-uuidgen by /dev/urandom based solution
authorpaul <paul@plutz.net>
Thu, 19 Mar 2015 23:52:12 +0000 (23:52 +0000)
committerpaul <paul@plutz.net>
Thu, 19 Mar 2015 23:52:12 +0000 (23:52 +0000)
svn path=/trunk/; revision=58

actions/new_attendee.sh
actions/new_course.sh
constants.sh
templates/edit_attendee.sh
templates/edit_course.sh

index c6d0301a855636ffc6e546fd4916306b666de458..72581a7c54f585b2dd993d7d970b6e107f3fd4cf 100644 (file)
@@ -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"
index 7cd0826b57305172238422cf26f651cfdda17413..e33f6812533e2854c0077c27b849c88d1dff6c89 100644 (file)
@@ -19,7 +19,7 @@
 
 cgi_post
 
-uid=$(dbus-uuidgen)
+uid=$(uuidgenerator)
 course="${uid}.ics"
 
 tzid=$(cat /etc/timezone)
index 1cce13c7164624646fd24c9894d96cd551924b0f..3d4e64839658e51c569c41f4bc86c080581eee7b 100644 (file)
@@ -18,3 +18,7 @@
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
 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
+}
index fd0e09c1ee5faed2927d6cd77a48c70e16785f38..e5050128db36e54f40301eb46e1a16d4e409c15d 100755 (executable)
@@ -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 '<div id="'${id}'" class="card">'
 echo '<form action="?action=update_attendee" method="POST">'
index 8aa9d5624f3205ce634b63ffa3bc96f4a06c3b79..67e051173189afd5856258a9811ac36c27fb2911 100755 (executable)
@@ -16,7 +16,7 @@
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
 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)