Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 109813
Collapse All | Expand All

(-)kvpnc-0.8.1/src/kvpnc.cpp (-42 / +30 lines)
Lines 2026-2039 Link Here
2026
				stream << "" << "\n";
2026
				stream << "" << "\n";
2027
				stream << "\n";
2027
				stream << "\n";
2028
				stream << "# name of tunnel, used to select lines in secrets files\n";
2028
				stream << "# name of tunnel, used to select lines in secrets files\n";
2029
				//stream << "remotename "+GlobalConfig->currentProfile->getName()+"\n";
2029
				stream << "remotename "+GlobalConfig->currentProfile->getName()+"\n";
2030
				stream << "remotename pptp-server\n";
2031
				stream << "\n";
2030
				stream << "\n";
2032
				stream << "# name of tunnel, used to name /var/run pid file\n";
2031
				stream << "# name of tunnel, used to name /var/run pid file\n";
2033
				stream << "linkname "+GlobalConfig->currentProfile->getName()+"\n";
2032
				stream << "linkname kvpnc."+GlobalConfig->currentProfile->getName()+"\n";
2034
				stream << "\n";
2033
				stream << "\n";
2035
				stream << "# name of tunnel, passed to ip-up scripts\n";
2034
				stream << "# name of tunnel, passed to ip-up scripts\n";
2036
				stream << "ipparam "+GlobalConfig->currentProfile->getName()+"\n";
2035
				stream << "ipparam kvpnc."+GlobalConfig->currentProfile->getName()+"\n";
2037
				stream << "\n";
2036
				stream << "\n";
2038
				stream << "# data stream for pppd to use\n";
2037
				stream << "# data stream for pppd to use\n";
2039
				stream << "pty \"pptp "+GlobalConfig->currentProfile->getGateway()+" --nolaunchpppd\"\n";
2038
				stream << "pty \"pptp "+GlobalConfig->currentProfile->getGateway()+" --nolaunchpppd\"\n";
Lines 2063-2099 Link Here
2063
2062
2064
				if ( GlobalConfig->currentProfile->getRequireMppe())
2063
				if ( GlobalConfig->currentProfile->getRequireMppe())
2065
				{
2064
				{
2066
					stream << "# use MPPE compression\n";
2065
2066
2067
					stream << "# use MPPE encryption\n";
2068
					stream << "mppe required";
2069
2070
					if (!GlobalConfig->currentProfile->getAllowStatefulMode())
2071
						stream << ",stateless";
2072
2067
					if (GlobalConfig->currentProfile->getRefuse128BitEncryption())
2073
					if (GlobalConfig->currentProfile->getRefuse128BitEncryption())
2068
					{
2074
						stream << ",no128";
2069
						stream << "nomppe-128\n";
2075
					
2070
						if (GlobalConfig->currentProfile->getRefuse40BitEncryption())
2076
					if (GlobalConfig->currentProfile->getRefuse40BitEncryption())
2071
							stream << "nomppe-40\n";
2077
						stream << ",no40";
2072
						else
2078
					
2073
						{
2079
					stream << "\n";
2074
							stream << "require-mppe-40\n";
2075
						}
2076
					}
2077
					else
2078
					{
2079
						stream << "require-mppe-128\n";
2080
					}
2081
					//stream << "require-mppe-40\n";
2082
					stream << "require-mppe\n";
2083
				}
2080
				}
2084
				else
2081
				else
2085
				{
2082
				{
2086
					stream  << "# disable MPPE compression\n";
2083
					stream  << "# disable MPPE encryption\n";
2087
					stream << "nomppe\n" ;
2084
					stream << "nomppe\n" ;
2088
					stream << "\n";
2085
					stream << "\n";
2089
				}
2086
				}
2090
2087
2091
				if (GlobalConfig->currentProfile->getAllowStatefulMode())
2092
				{
2093
					stream << "# Allow MPPE stateful mode\n";
2094
					stream << "mppe-stateful\n";
2095
					stream << "\n";
2096
				}
2097
2088
2098
				if (GlobalConfig->enableDebugPppd)
2089
				if (GlobalConfig->enableDebugPppd)
2099
				{
2090
				{
Lines 2123-2129 Link Here
2123
				else
2114
				else
2124
				{
2115
				{
2125
					stream << "# Use BSD compression\n";
2116
					stream << "# Use BSD compression\n";
2126
					stream << "bsdcomp\n";
2117
					stream << "bsdcomp 9,15\n";
2127
					stream << "\n";
2118
					stream << "\n";
2128
				}
2119
				}
2129
2120
Lines 2137-2143 Link Here
2137
				{
2128
				{
2138
					stream << "# Use deflate method\n";
2129
					stream << "# Use deflate method\n";
2139
					// FIXME make values dynamiclly
2130
					// FIXME make values dynamiclly
2140
					stream << "deflate 9,9\n";
2131
					stream << "deflate 9,15\n";
2141
					stream << "\n";
2132
					stream << "\n";
2142
				}
2133
				}
2143
2134
Lines 2169-2175 Link Here
2169
				if (GlobalConfig->currentProfile->getDisableMPPEComp() )
2160
				if (GlobalConfig->currentProfile->getDisableMPPEComp() )
2170
				{
2161
				{
2171
					stream << "# disable Microsoft Point-to-Point Compression (MPPC) (i.e. for compatibility with watchguard firebox)\n";
2162
					stream << "# disable Microsoft Point-to-Point Compression (MPPC) (i.e. for compatibility with watchguard firebox)\n";
2172
					stream << "nopcomp\n";
2163
					stream << "nomppc\n";
2173
					stream << "\n";
2164
					stream << "\n";
2174
				}
2165
				}
2175
2166
Lines 2188-2211 Link Here
2188
					stream << "# generated by kvpnc. Do not edit it." << "\n";
2179
					stream << "# generated by kvpnc. Do not edit it." << "\n";
2189
					stream << "# profile: " + GlobalConfig->currentProfile->getName() << "\n";
2180
					stream << "# profile: " + GlobalConfig->currentProfile->getName() << "\n";
2190
					stream << "# client server secret IP addresses" << "\n";
2181
					stream << "# client server secret IP addresses" << "\n";
2182
2183
					if (GlobalConfig->currentProfile->getSaveUserPassword())
2184
						TmpPassword = GlobalConfig->currentProfile->getUserPassword();
2185
2186
2191
					if (GlobalConfig->currentProfile->getUseAdvancedSettings() && GlobalConfig->currentProfile->getUseNtDomainName() && !GlobalConfig->currentProfile->getNtDomainName().isEmpty())
2187
					if (GlobalConfig->currentProfile->getUseAdvancedSettings() && GlobalConfig->currentProfile->getUseNtDomainName() && !GlobalConfig->currentProfile->getNtDomainName().isEmpty())
2192
					{
2188
					{
2193
						stream << "PPTP " << GlobalConfig->currentProfile->getNtDomainName() << "\\\\" << GlobalConfig->currentProfile->getUserName()<<" *\n";
2189
						stream << GlobalConfig->currentProfile->getName() + " " << GlobalConfig->currentProfile->getNtDomainName() << "\\\\" << GlobalConfig->currentProfile->getUserName() + " " <<  TmpPassword << " *\n";
2190
						stream << GlobalConfig->currentProfile->getNtDomainName() << "\\\\" << GlobalConfig->currentProfile->getUserName()<< " "+GlobalConfig->currentProfile->getName() + " " <<  TmpPassword << " *\n";
2194
					}
2191
					}
2195
					else
2192
					else
2196
					{
2193
					{
2197
						//   stream << GlobalConfig->currentProfile->getUserName() << " " << GlobalConfig->currentProfile->getName() << " " <<  GlobalConfig->currentProfile->getUserPassword() << " *\n";
2198
						if (GlobalConfig->currentProfile->getSaveUserPassword())
2199
						{
2200
							stream << GlobalConfig->currentProfile->getUserName() << " " << "pptp-server" << " " <<  GlobalConfig->currentProfile->getUserPassword() << " *\n";
2201
							stream << "pptp-server "  << GlobalConfig->currentProfile->getUserName() << " " <<  GlobalConfig->currentProfile->getUserPassword() << " *\n";
2202
						}
2203
						else
2204
						{
2205
							stream << GlobalConfig->currentProfile->getUserName() << " " << "pptp-server" << " " <<  TmpPassword << " *\n";
2206
							stream << "pptp-server" << GlobalConfig->currentProfile->getUserName() << " " << " " <<  TmpPassword << " *\n";
2207
						}
2208
2194
2195
						stream << GlobalConfig->currentProfile->getName() + " " << GlobalConfig->currentProfile->getUserName() + " " <<  TmpPassword << " *\n";
2196
						stream << GlobalConfig->currentProfile->getUserName() + " " << GlobalConfig->currentProfile->getName() + " "  <<  TmpPassword << " *\n";
2209
					}
2197
					}
2210
					file.close();
2198
					file.close();
2211
				}
2199
				}

Return to bug 109813