For suid/sgid servers the operating system version must match the one the
1999-02-19 Martin Baulig <martin@home-of-linux.org> * lib/open.c, src/daemon/version.c: For suid/sgid servers the operating system version must match the one the server was compiled on.
This commit is contained in:
committed by
Martin Baulig
parent
eaf527d66a
commit
35995577ca
@@ -23,18 +23,25 @@
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/version.h>
|
||||
|
||||
#include <sys/utsname.h>
|
||||
|
||||
void
|
||||
glibtop_send_version (glibtop *server, int fd)
|
||||
{
|
||||
char buffer [BUFSIZ];
|
||||
char buffer [BUFSIZ+10];
|
||||
struct utsname uts;
|
||||
size_t size;
|
||||
|
||||
sprintf (buffer, LIBGTOP_VERSION_STRING,
|
||||
LIBGTOP_VERSION, LIBGTOP_SERVER_VERSION,
|
||||
sizeof (glibtop_command),
|
||||
sizeof (glibtop_response),
|
||||
sizeof (glibtop_union),
|
||||
sizeof (glibtop_sysdeps));
|
||||
if (uname (&uts))
|
||||
glibtop_error_io_r (server, "uname");
|
||||
|
||||
snprintf (buffer, BUFSIZ, LIBGTOP_VERSION_STRING,
|
||||
LIBGTOP_VERSION, LIBGTOP_SERVER_VERSION,
|
||||
sizeof (glibtop_command),
|
||||
sizeof (glibtop_response),
|
||||
sizeof (glibtop_union),
|
||||
sizeof (glibtop_sysdeps),
|
||||
uts.sysname, uts.release, uts.machine);
|
||||
|
||||
size = strlen (buffer) + 1;
|
||||
|
||||
|
Reference in New Issue
Block a user