patch to exec_domain
Currently, the personality(2) system call always returns the previous persona. However, according to the manpage, it should return the previous persona when successful and -1 otherwise. The following patch to lookup_exec_domain() should remedy this behavior:
--- kernel-source-2.4.12.orig/kernel/exec_domain.c Thu Oct 18 09:12:47
2001
+++ kernel-source-2.4.12/kernel/exec_domain.c Thu Oct 18 09:23:59 2001
@@ -100,7 +100,7 @@
}
#endif
- ep = &default_exec_domain;
+ ep = NULL;
out:
read_unlock(&exec_domains_lock);
return (ep);Kjohn Sasitorn
[email protected]
Quoted 4 lines · Kjohn Sasitorn
Currently, the personality(2) system call always returns the previous persona. However, according to the manpage, it should return the previous persona when successful and -1 otherwise. The following patch to
lookup_exec_domain()should remedy this behavior:
Actually I think that problem was already fixed. However, this looks like it fixes another problem I've seen though where personality doesn't return EINVAL if you pass it a bad personality. Right fix, wrong bug :)
Thanks,
Paul Larson