Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew-buildout-re6st
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew-buildout-re6st
Commits
c101f43a
Commit
c101f43a
authored
Sep 10, 2018
by
Lorenzo Martinico
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Match all interfaces
parent
e8700da0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
shill_wrapper.c
shill_wrapper.c
+4
-3
No files found.
shill_wrapper.c
View file @
c101f43a
...
@@ -26,10 +26,11 @@
...
@@ -26,10 +26,11 @@
#include <stdlib.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <dlfcn.h>
#include <fcntl.h>
#include <fcntl.h>
#include <fnmatch.h>
#include <unistd.h>
#include <unistd.h>
#include <sys/auxv.h>
#include <sys/auxv.h>
#define ORIGINAL_CONF_PATH "/proc/sys/net/ipv6/conf/
wlan0
/accept_ra"
#define ORIGINAL_CONF_PATH "/proc/sys/net/ipv6/conf
/
*
/accept_ra"
/* Standard O_TMPFILE includes O_DIRECTORY bit, but we do not want to call
/* Standard O_TMPFILE includes O_DIRECTORY bit, but we do not want to call
* va_arg if O_DIRECTORY is set alone. Hence, define a "purer" O_TMPFILE. */
* va_arg if O_DIRECTORY is set alone. Hence, define a "purer" O_TMPFILE. */
...
@@ -64,7 +65,7 @@ static void init(void) {
...
@@ -64,7 +65,7 @@ static void init(void) {
int
open
(
const
char
*
__file
,
int
__oflag
,
...)
{
int
open
(
const
char
*
__file
,
int
__oflag
,
...)
{
if
(
!
original_open
)
if
(
!
original_open
)
init
();
init
();
if
(
!
strcmp
(
__file
,
ORIGINAL_CONF_PATH
))
if
(
!
fnmatch
(
ORIGINAL_CONF_PATH
,
__file
,
FNM_PATHNAME
))
__file
=
"/dev/null"
;
__file
=
"/dev/null"
;
if
(
__oflag
&
(
O_CREAT
|
PURE_O_TMPFILE
))
{
if
(
__oflag
&
(
O_CREAT
|
PURE_O_TMPFILE
))
{
va_list
ap
;
va_list
ap
;
...
@@ -81,7 +82,7 @@ int open(const char *__file, int __oflag, ...) {
...
@@ -81,7 +82,7 @@ int open(const char *__file, int __oflag, ...) {
FILE
*
fopen
(
const
char
*
path
,
const
char
*
mode
)
{
FILE
*
fopen
(
const
char
*
path
,
const
char
*
mode
)
{
if
(
!
original_fopen
)
if
(
!
original_fopen
)
init
();
init
();
if
(
!
strcmp
(
path
,
ORIGINAL_CONF_PATH
))
if
(
!
fnmatch
(
ORIGINAL_CONF_PATH
,
path
,
FNM_PATHNAME
))
path
=
"/dev/null"
;
path
=
"/dev/null"
;
return
(
*
original_fopen
)(
path
,
mode
);
return
(
*
original_fopen
)(
path
,
mode
);
}
}
...
...
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