|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] tools/pygrub: Fix bug in LIMIT_FSIZE env variable override
commit de577641cf4fc4c3b3ee89c3ee44304cadd8c65c
Author: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
AuthorDate: Mon Nov 6 15:05:04 2023 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Nov 23 17:21:01 2023 +0000
tools/pygrub: Fix bug in LIMIT_FSIZE env variable override
The env variable must be interpreted as an integer. As it is, the override
logic simply causes an exception.
Fixes: e0342ae5556f ("tools/pygrub: Deprivilege pygrub")
Signed-off-by: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
tools/pygrub/src/pygrub | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index 08540ad288..327cf51774 100755
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -89,7 +89,7 @@ def downgrade_rlimits():
# write permissions are bound.
fsize = LIMIT_FSIZE
if "PYGRUB_MAX_FILE_SIZE_MB" in os.environ.keys():
- fsize = os.environ["PYGRUB_MAX_FILE_SIZE_MB"] << 20
+ fsize = int(os.environ["PYGRUB_MAX_FILE_SIZE_MB"]) << 20
resource.setrlimit(resource.RLIMIT_FSIZE, (fsize, fsize))
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |