diff options
author | Amitay Isaacs <amitay@gmail.com> | 2012-07-26 22:01:50 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2012-07-26 22:01:50 +1000 |
commit | c44a97dfa14d5a702aebbe54906bca87dbdc3b93 (patch) | |
tree | c178bafe47c3ac58138cc54a5761f010a8b7613f /ctdb/common | |
parent | 4d4768ef26def4becba87c2fc6db6a1671ba7541 (diff) | |
download | samba-c44a97dfa14d5a702aebbe54906bca87dbdc3b93.tar.gz samba-c44a97dfa14d5a702aebbe54906bca87dbdc3b93.tar.xz samba-c44a97dfa14d5a702aebbe54906bca87dbdc3b93.zip |
util: Do not lock down memory when running with local daemons
Thanks to Ronnie for highlighting the issue of memory lockdown on AIX.
Fix typo, use getuid and not getpid.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 21a5cbf9518fafc610939f14874371a52b1dc8b3)
Diffstat (limited to 'ctdb/common')
-rw-r--r-- | ctdb/common/ctdb_util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c index 30effdd52e..ed322ac8b7 100644 --- a/ctdb/common/ctdb_util.c +++ b/ctdb/common/ctdb_util.c @@ -642,8 +642,13 @@ void ctdb_lockdown_memory(struct ctdb_context *ctdb) return; } + /* TODO: Add a command line option to disable memory lockdown. + * This can be a performance issue on AIX since fork() copies + * all locked memory pages. + */ + /* Ignore when running in local daemons mode */ - if (getpid() != 0) { + if (getuid() != 0) { return; } |