fix a stupid mistake from the previous commit

This commit is contained in:
Martin Sekera 2021-05-30 23:46:13 +02:00
parent b96c163c8f
commit 7a51d286f2

6
btv
View file

@ -249,7 +249,7 @@ def serialize(snap, outdir, key, snap_from=None):
## add a self-check executable
with open(os.path.join(directory, "check-integrity.sh"), "w") as f:
f.write("#! /bin/sh\n\nsha512sum --check manifest.sha512\n")
os.chmod(f.name, 0o555)
os.chmod(f.name, 0o500)
## fix permissions and ownership of created objects
outdir_stat = os.stat(outdir)
@ -260,7 +260,9 @@ def serialize(snap, outdir, key, snap_from=None):
os.chown(path, outdir_stat.st_uid, outdir_stat.st_gid)
if path.endswith(".aes") or path.endswith(".sha512"):
os.chmod(path, 0o100)
os.chmod(path, 0o400)
return 0