|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/6] 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.
Signed-off-by: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
---
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))
--
2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |