[Bug 276809] SEGFAULTs using libjail
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Feb 2024 19:58:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276809 --- Comment #2 from Fabiano Sidler <freebsd-bugs@aliases.systohc.net> --- Ah, of course I'm an idiot! How can I expect any param to have a value in such a "list all possible param NAMES" call? The C program works now as expected, but I still get the SEGFAULT in Python after the first parameter (zfs.mount_snapshot). What is there still a problem? --- listjailparams.c.old 2024-02-03 20:07:04.525535000 +0100 +++ listjailparams.c 2024-02-03 19:55:56.447438000 +0100 @@ -8,7 +8,7 @@ printf("number of params: %d\n", nparams); for (int i=0; i<nparams; i++) { - printf("jailparam: %s\n", jailparam_export(¶ms[i])); + printf("jailparam: %s\n", params[i].jp_name); } jailparam_free(params, nparams); return 0; --- listjailparams.py.old 2024-02-03 20:07:38.644856000 +0100 +++ listjailparams.py 2024-02-03 20:08:03.131423000 +0100 @@ -25,8 +25,7 @@ for i in range(nparams): param = params[i] name = param.name.decode('utf-8') - value = param.value if param.value is None else param.value.decode('utf-8') - print(f'Name: {name}, Value: {value}') + print('jailparam: %s'%name) jailparam_free(params, nparams) # vim:ts=2:noet: -- You are receiving this mail because: You are the assignee for the bug.