diff options
author | jkar8572 <jkar8572> | 2008-08-13 15:52:17 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2008-08-13 15:52:17 +0000 |
commit | 88e403c035811681fbe472566b6ae411ed1e2f5c (patch) | |
tree | 83dbbc2fe8efd181235e79a09c2f2d190dc633f7 | |
parent | f731f463d761ff678472a5790080b3d3350e5e57 (diff) |
Fix bug in warnquota which could result in bogus hostname and domainname (anonymous reporter)
-rw-r--r-- | Changelog | 1 | ||||
-rw-r--r-- | warnquota.c | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -1,4 +1,5 @@ Changes in quota-tools from 3.16 to 3.17 +* fix bug in warnquota which could result in bogus hostname and domainname (anonymous reporter) * implemented writing of messages that user got below hard/soft limits to quota_nld (Jan Kara) * use PKG_CHECK_MODULES to check for DBUS (Ladislav Michnovic) * Implement setting of charset for emails sent by warnquota (Michael Meskes) diff --git a/warnquota.c b/warnquota.c index 56adbc0..92af237 100644 --- a/warnquota.c +++ b/warnquota.c @@ -10,7 +10,7 @@ * * Author: Marco van Wieringen <mvw@planets.elm.net> * - * Version: $Id: warnquota.c,v 1.31 2008/07/09 15:26:37 jkar8572 Exp $ + * Version: $Id: warnquota.c,v 1.32 2008/08/13 15:52:17 jkar8572 Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -1061,8 +1061,8 @@ static void get_host_name(void) if (uname(&uts)) die(1, _("Cannot get host name: %s\n"), strerror(errno)); - hostname = uts.nodename; - domainname = uts.domainname; + hostname = sstrdup(uts.nodename); + domainname = sstrdup(uts.domainname); } int main(int argc, char **argv) |