Project

General

Profile

« Previous | Next » 

Revision 8901958c

Added by Jim Pingle almost 15 years ago

Add backend code to verify username against cn on login if set by user. Needs GUI code to set the option yet. Ticket #887

View differences:

etc/inc/openvpn.inc
392 392
						$firstsed = 1;
393 393
						$sed .= "\"{$authcfg}\"";
394 394
					}
395
					$sed .= ");";
395
					$sed .= ");\\\n";
396
					if (isset($settings['strictusercn']))
397
						$sed .= "\$strictusercn = true;";
396 398
					mwexec("/bin/cat /etc/inc/openvpn.auth-user.php | /usr/bin/sed 's/\/\/<template>/{$sed}/g' >  {$g['varetc_path']}/openvpn/{$mode_id}.php");
397 399
					mwexec("/bin/chmod a+x {$g['varetc_path']}/openvpn/{$mode_id}.php");
398 400
					$conf .= "auth-user-pass-verify {$g['varetc_path']}/openvpn/{$mode_id}.php via-env\n";

Also available in: Unified diff