New upstream snapshot.
Debian Janitor
2 years ago
0 | |
setup.py
|
1 | |
unshare.c
|
2 | |
COPYING
|
|
0 |
Metadata-Version: 1.0
|
|
1 |
Name: python-unshare
|
|
2 |
Version: 0.2
|
|
3 |
Summary: Python bindings for the Linux unshare() syscall
|
|
4 |
Home-page: https://github.com/TheTincho/python-unshare
|
|
5 |
Author: Martin Ferrari
|
|
6 |
Author-email: martin.ferrari@gmail.com
|
|
7 |
License: GPLv2
|
|
8 |
Description: This simple extension provides bindings to the Linux unshare() syscall, added in kernel version 2.6.16
|
|
9 |
|
|
10 |
By using unshare(), new and interesting features of the Linux kernel can be exploited, such as:
|
|
11 |
|
|
12 |
* Creating a new network name space (CLONE_NEWNET)
|
|
13 |
* Creating a new file system mount name space (CLONE_NEWNS)
|
|
14 |
* Reverting other features shared from clone()
|
|
15 |
Platform: Linux
|
5 | 5 |
* Creating a new file system mount name space (`CLONE_NEWNS`)
|
6 | 6 |
* Reverting other features shared from `clone()`
|
7 | 7 |
|
8 | |
This library provides an equivalent of the (recently added) util-linux command-line program `unshare`.
|
|
8 |
This library provides an equivalent of the util-linux command-line program `unshare`.
|
|
0 |
python-unshare (0.2+git20180520.1.4e98c17-1) UNRELEASED; urgency=low
|
|
1 |
|
|
2 |
* New upstream snapshot.
|
|
3 |
|
|
4 |
-- Debian Janitor <janitor@jelmer.uk> Tue, 01 Jun 2021 21:32:58 -0000
|
|
5 |
|
0 | 6 |
python-unshare (0.2-1) unstable; urgency=medium
|
1 | 7 |
|
2 | 8 |
* New upstream release.
|
18 | 18 |
long_description = longdesc,
|
19 | 19 |
author = 'Martin Ferrari',
|
20 | 20 |
author_email = 'martin.ferrari@gmail.com',
|
21 | |
url = 'http://code.google.com/p/python-unshare/',
|
|
21 |
url = 'https://github.com/TheTincho/python-unshare',
|
22 | 22 |
license = 'GPLv2',
|
23 | 23 |
platforms = 'Linux',
|
24 | 24 |
ext_modules = [module1])
|
73 | 73 |
{NULL, NULL, 0, NULL}
|
74 | 74 |
};
|
75 | 75 |
|
76 | |
PyMODINIT_FUNC initunshare(void) {
|
|
76 |
#if PY_MAJOR_VERSION >= 3
|
|
77 |
static struct PyModuleDef moduledef =
|
|
78 |
{
|
|
79 |
PyModuleDef_HEAD_INIT,
|
|
80 |
"unshare", /* name of module */
|
|
81 |
"", /* module documentation, may be NULL */
|
|
82 |
-1, /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */
|
|
83 |
methods
|
|
84 |
};
|
|
85 |
#endif
|
|
86 |
|
|
87 |
#if PY_MAJOR_VERSION >= 3
|
|
88 |
#define MOD_INIT(name) PyMODINIT_FUNC PyInit_##name(void)
|
|
89 |
#else
|
|
90 |
#define MOD_INIT(name) PyMODINIT_FUNC init##name(void)
|
|
91 |
#endif
|
|
92 |
|
|
93 |
MOD_INIT(unshare) {
|
77 | 94 |
PyObject *m;
|
78 | |
m = Py_InitModule("unshare", methods);
|
|
95 |
|
|
96 |
#if PY_MAJOR_VERSION >= 3
|
|
97 |
m = PyModule_Create(&moduledef);
|
|
98 |
if (m == NULL)
|
|
99 |
return NULL;
|
|
100 |
#else
|
|
101 |
m = Py_InitModule3("unshare", methods, "");
|
79 | 102 |
if (m == NULL)
|
80 | 103 |
return;
|
|
104 |
#endif
|
81 | 105 |
|
82 | 106 |
/* Currently (2.6.33) not-implemented: CLONE_VM, CLONE_SIGHAND,
|
83 | 107 |
* CLONE_THREAD, CLONE_NEWUSER, CLONE_NEWPID */
|
|
100 | 124 |
PyModule_AddIntConstant(m, "CLONE_NEWPID", CLONE_NEWPID);
|
101 | 125 |
/* CAP_SYS_ADMIN */
|
102 | 126 |
PyModule_AddIntConstant(m, "CLONE_NEWNET", CLONE_NEWNET);
|
|
127 |
|
|
128 |
#if PY_MAJOR_VERSION >= 3
|
|
129 |
return m;
|
|
130 |
#endif
|
103 | 131 |
}
|
104 | 132 |
|