From 540009244c7c9f1aec64af6fb1efba7245ed8bb3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 15 Jun 1999 11:54:33 +0000 Subject: Update. 1999-06-14 Thorsten Kukuk * nscd/connections.c (handle_request): Only root is allowed to send GETSTAT request in non secure mode. * nscd/nscd.c: Print error message if other then root try to use getstat. 1999-06-15 Andreas Jaeger * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add __sysctl. 1999-06-15 Andreas Jaeger * manual/time.texi (Limits on Resources): Describe RLIMIT_AS. Closes PR libc/1164, reported by sascha@schumann.2ns.de. --- nscd/connections.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'nscd/connections.c') diff --git a/nscd/connections.c b/nscd/connections.c index 4daa099..9d1b4d3 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -311,13 +311,15 @@ cannot handle old request version %d; current version is %d"), break; case GETSTAT: - send_stats (fd, dbs); - break; - case SHUTDOWN: - /* Accept shutdown only from root */ + /* Accept shutdown and getstat only from root */ if (secure_in_use && uid == 0) - termination_handler (0); + { + if (req->type == GETSTAT) + send_stats (fd, dbs); + else + termination_handler (0); + } else { struct ucred caller; @@ -330,8 +332,14 @@ cannot handle old request version %d; current version is %d"), dbg_log (_("error getting callers id: %s"), strerror_r (errno, buf, sizeof (buf))); } - else if (caller.uid == 0) - termination_handler (0); + else + if (caller.uid == 0) + { + if (req->type == GETSTAT) + send_stats (fd, dbs); + else + termination_handler (0); + } } break; -- cgit v1.1