summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog1
-rw-r--r--warnquota.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/Changelog b/Changelog
index ee9c949..ed9eace 100644
--- a/Changelog
+++ b/Changelog
@@ -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)