Update of /cvsroot/tmda/tmda/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv20390
Modified Files:
ChangeLog tmda-ofmipd
Log Message:
Removed redundant comand line parameter to tmda-inject (--config-file) in
VDomainProxy.process_message. $HOME is set properly, so tmda-inject can
find the virtual user's config file itself.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/ChangeLog,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -r1.249 -r1.250
--- ChangeLog 27 Jan 2003 07:47:59 -0000 1.249
+++ ChangeLog 28 Jan 2003 03:43:38 -0000 1.250
@@ -6,6 +6,10 @@
connected to, if no file. If file exists but server IP cannot be
found, fall back to localhost.
+ (VDomainProxy.process_message): Removed the --config-file command
+ line parameter to tmda-inject, since tmda-inject can find the
+ config file on its own now, thanks to a properly set $HOME.
+
(ipauthmap2dict): Helper function to read ipauthmap and return
Python dictionary.
Index: tmda-ofmipd
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/tmda-ofmipd,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- tmda-ofmipd 27 Jan 2003 07:47:59 -0000 1.22
+++ tmda-ofmipd 28 Jan 2003 03:43:38 -0000 1.23
@@ -618,8 +618,9 @@
return 501
self.__auth_username = username.lower()
self.__auth_password = password
+ localip = self.__conn.getsockname()[0]
+ os.environ['TCPLOCALIP'] = localip
if remoteauth['enable']:
- localip = self.__conn.getsockname()[0]
# Try first with the remote auth
if run_remoteauth(username, password, localip):
return 1
@@ -646,8 +647,9 @@
return 0
self.__auth_username = username.lower()
self.__auth_password = password
+ localip = self.__conn.getsockname()[0]
+ os.environ['TCPLOCALIP'] = localip
if remoteauth['enable']:
- localip = self.__conn.getsockname()[0]
# Try first with the remote auth
if run_remoteauth(username, password, localip):
return 1
@@ -1065,7 +1067,7 @@
os.environ['TCPLOCALIP'] = self._localip
# Set up partial tmda-inject command line.
execdir = os.path.dirname(os.path.abspath(program))
- inject_path = os.path.join(execdir, 'tmda-inject')
+ inject_cmd = os.path.join(execdir, 'tmda-inject')
userinfo = auth_username.split('@', 1)
user = userinfo[0]
if len(userinfo) > 1:
@@ -1090,7 +1092,7 @@
prepend = self._mta.getvdomainprepend(auth_username,
vdomainspath)
if not prepend:
- err = 'Error: "%s" not a virtual domain' % (domain,)
+ err = 'Error: "%s" is not a virtual domain' % (domain,)
print >> DEBUGSTREAM, err
os._exit(-1)
os.seteuid(0)
@@ -1105,10 +1107,6 @@
print >> DEBUGSTREAM, 'vuser homedir: "%s"' % (vhomedir,)
# This is so "~" will work in the .tmda/* files.
os.environ['HOME'] = vhomedir
- # Create the final tmda-inject command line.
- tmda_configfile = os.path.join(vhomedir, '.tmda', 'config')
- inject_cmd = '%s --config-file %s' % (inject_path, tmda_configfile)
-
try:
Util.pipecmd('%s %s' %
(inject_cmd, ' '.join
_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs