SF.net SVN: tmda: [2117] trunk/tmda/bin
[email protected] Sun, 29 Oct 2006 21:58:46 -0800
| Newsgroups | gmane.mail.spam.tmda.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 2117
http://svn.sourceforge.net/tmda/?rev=2117&view=rev
Author: jasonrm
Date: 2006-10-29 21:58:42 -0800 (Sun, 29 Oct 2006)
Log Message:
-----------
On oddly configured systems, sometimes socket.getfqdn()
can't determine the FQDN, but socket.gethostname() gets
us the hostname, which is better than just 'localhost'.
Modified Paths:
--------------
trunk/tmda/bin/ChangeLog
trunk/tmda/bin/tmda-ofmipd
Modified: trunk/tmda/bin/ChangeLog
===================================================================
--- trunk/tmda/bin/ChangeLog 2006-10-30 03:07:56 UTC (rev 2116)
+++ trunk/tmda/bin/ChangeLog 2006-10-30 05:58:42 UTC (rev 2117)
@@ -1,3 +1,8 @@
+2006-10-29 Jason R. Mastaler <[email protected]>
+
+ * tmda-ofmipd (FQDN): Fall back to gethostname() if getfqdn() only
+ returns 'localhost'.
+
2006-10-13 Jason R. Mastaler <[email protected]>
* tmda-rfilter: Migrate from getopt to optparse.
Modified: trunk/tmda/bin/tmda-ofmipd
===================================================================
--- trunk/tmda/bin/tmda-ofmipd 2006-10-30 03:07:56 UTC (rev 2116)
+++ trunk/tmda/bin/tmda-ofmipd 2006-10-30 05:58:42 UTC (rev 2117)
@@ -50,6 +50,8 @@
program = sys.argv[0]
FQDN = socket.getfqdn()
+if FQDN == 'localhost':
+ FQDN = socket.gethostname()
if os.getuid() == 0:
running_as_root = True
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.