2001-10-24 14:34:03

by Kjohn Sasitorn

[permalink] [raw]
Subject: 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]


2001-10-24 15:07:43

by Paul Larson

[permalink] [raw]
Subject: Re: patch to exec_domain

On Wed, 2001-10-24 at 14:34, Kjohn Sasitorn wrote:
> 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