aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/file-systems.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-06-07 12:11:24 -0400
committerLeo Famulari <leo@famulari.name>2017-06-07 12:11:55 -0400
commitc67d587f94173fd42d65097165afc5c512935646 (patch)
treeee2bac9d683d0dec98d611d5e590b06d9876cad3 /gnu/build/file-systems.scm
parent4f493cba06b97de756123b3855ea52dcf1ad3555 (diff)
parent4679dd6967c21e21c740cd88e17191b8e2aac5ee (diff)
downloadguix-c67d587f94173fd42d65097165afc5c512935646.tar
guix-c67d587f94173fd42d65097165afc5c512935646.tar.gz
Merge branch 'master' into core-updates
This merge commit includes a fix for CVE-2017-6512 in Perl 5.26.0.
Diffstat (limited to 'gnu/build/file-systems.scm')
-rw-r--r--gnu/build/file-systems.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 10be0dc83c..7737de3d03 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -268,12 +268,18 @@ as a bytevector, or #f if DEVICE does not contain an iso9660 file system."
(define (iso9660-superblock-uuid sblock)
"Return the modification time of an iso9660 primary volume descriptor
-SBLOCK as a bytevector."
+SBLOCK as a bytevector. If that's not set, returns the creation time."
;; Drops GMT offset for compatibility with Grub, blkid and /dev/disk/by-uuid.
;; Compare Grub: "2014-12-02-19-30-23-00".
;; Compare blkid result: "2014-12-02-19-30-23-00".
;; Compare /dev/disk/by-uuid entry: "2014-12-02-19-30-23-00".
- (sub-bytevector sblock 830 16))
+ (let* ((creation-time (sub-bytevector sblock 813 17))
+ (modification-time (sub-bytevector sblock 830 17))
+ (unset-time (make-bytevector 17 0))
+ (time (if (bytevector=? unset-time modification-time)
+ creation-time
+ modification-time)))
+ (sub-bytevector time 0 16))) ; strips GMT offset.
(define (iso9660-uuid->string uuid)
"Given an UUID bytevector, return its timestamp string."