Displaying 1 result from an estimated 1 matches for "rsyslog_princ".
2009 Aug 11
0
[PATCH server] Added support for remote logging with rsyslog-gssapi to server.
...39;")
+ if ret != 0:
+ raise
+
+def get_ip(hostname):
+ return socket.gethostbyname(hostname)
+
+default_realm = krbV.Context().default_realm
+
+# In the following tuple, [0] is fqdn, [2] is ip address
+server_fqdn = socket.gethostbyaddr(socket.gethostname())[0]
+
+rsyslog_princ = 'rsyslog/' + server_fqdn + '@' + default_realm
+outname = '/etc/krb5.keytab'
+
+kadmin_local('addprinc -randkey ' + rsyslog_princ)
+kadmin_local('ktadd -k ' + outname + ' ' + rsyslog_princ)
+
+os.chmod(outname, 0644)
diff --git a/src/host-browser/ho...