Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NetworkManager-l2tp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CeRiAl
NetworkManager-l2tp
Commits
9e8a93fc
Commit
9e8a93fc
authored
Mar 27, 2015
by
CeRiAl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove nm-l2tp-hide-secrets-948194.patch (was already fixed)
parent
83bebbc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
41 deletions
+0
-41
nm-l2tp-hide-secrets-948194.patch
patches/nm-l2tp-hide-secrets-948194.patch
+0
-41
No files found.
patches/nm-l2tp-hide-secrets-948194.patch
deleted
100644 → 0
View file @
83bebbc1
When nm-l2tp-service creates a temporary file to hold the secret key
for an IPsec connection, the file it creates is world-readable! Even
though the file persists for a short time, this is clearly a security
risk.
This patch changes the umask so that the temp file will be accessible
only to root.
src/nm-l2tp-service.c | 4 ++++
1 file changed, 4 insertions(+)
Index: NetworkManager-l2tp-0.9.8.7/src/nm-l2tp-service.c
===================================================================
--- NetworkManager-l2tp-0.9.8.7.orig/src/nm-l2tp-service.c
+++ NetworkManager-l2tp-0.9.8.7/src/nm-l2tp-service.c
@@ -888,6 +888,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin
char session_name[128];
guint sys=0;
FILE *fp;
+ mode_t orig_umask;
if (!(ipsec_binary=nm_find_ipsec())) {
g_set_error (error,
@@ -938,7 +939,9 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin
return FALSE;
}
+ orig_umask = umask(0077);
if(!(fp=fopen("/etc/ipsec.secrets","w"))) {
+ umask(orig_umask);
rename(tmp_secrets, "/etc/ipsec.secrets");
g_set_error (error,
NM_VPN_PLUGIN_ERROR,
@@ -957,6 +960,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin
if(!value)value="";
fprintf(fp, ": PSK \"%s\"\n",value);
fclose(fp);
+ umask(orig_umask);
sys += system("PATH=\"/sbin:/usr/sbin:/usr/local/sbin:$PATH\" ipsec secrets");
sys += system(cmd11);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment