Module Name:    src
Committed By:   riastradh
Date:           Tue Sep  5 12:31:33 UTC 2023

Modified Files:
        src/tests/usr.sbin/certctl: t_certctl.sh

Log Message:
certctl(8): Test permissions of ca-certificates.crt.

Inadvertently created 0600 instead of 0644 due to copying file
created by mktemp(1) with cp(1).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.sbin/certctl/t_certctl.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.sbin/certctl/t_certctl.sh
diff -u src/tests/usr.sbin/certctl/t_certctl.sh:1.8 src/tests/usr.sbin/certctl/t_certctl.sh:1.9
--- src/tests/usr.sbin/certctl/t_certctl.sh:1.8	Sat Sep  2 17:42:01 2023
+++ src/tests/usr.sbin/certctl/t_certctl.sh	Tue Sep  5 12:31:33 2023
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-#	$NetBSD: t_certctl.sh,v 1.8 2023/09/02 17:42:01 riastradh Exp $
+#	$NetBSD: t_certctl.sh,v 1.9 2023/09/05 12:31:33 riastradh Exp $
 #
 # Copyright (c) 2023 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -150,11 +150,15 @@ checks()
 		done
 	done
 
-	# Verify the certificate bundle is there and delete it.
+	# Verify the certificate bundle is there with the right
+	# permissions (0644) and delete it.
 	#
 	# XXX Verify its content.
 	atf_check -s exit:0 test -f certs/ca-certificates.crt
 	atf_check -s exit:0 test ! -h certs/ca-certificates.crt
+	atf_expect_fail "wrong permissions on ca-certificates.crt"
+	atf_check -s exit:0 -o inline:'100644\n' \
+	    stat -f %p certs/ca-certificates.crt
 	rm certs/ca-certificates.crt
 
 	# Make sure after deleting everything there's nothing left.

Reply via email to