Package list python-unshare / f512e8e
New upstream snapshot. Debian Janitor 2 months ago
6 changed file(s) with 54 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
+0
-3
MANIFEST less more
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
55 * Creating a new file system mount name space (`CLONE_NEWNS`)
66 * Reverting other features shared from `clone()`
77
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> Thu, 22 Jul 2021 04:33:57 -0000
5
06 python-unshare (0.2-1) unstable; urgency=medium
17
28 * New upstream release.
1818 long_description = longdesc,
1919 author = 'Martin Ferrari',
2020 author_email = 'martin.ferrari@gmail.com',
21 url = 'http://code.google.com/p/python-unshare/',
21 url = 'https://github.com/TheTincho/python-unshare',
2222 license = 'GPLv2',
2323 platforms = 'Linux',
2424 ext_modules = [module1])
7373 {NULL, NULL, 0, NULL}
7474 };
7575
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) {
7794 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, "");
79102 if (m == NULL)
80103 return;
104 #endif
81105
82106 /* Currently (2.6.33) not-implemented: CLONE_VM, CLONE_SIGHAND,
83107 * CLONE_THREAD, CLONE_NEWUSER, CLONE_NEWPID */
100124 PyModule_AddIntConstant(m, "CLONE_NEWPID", CLONE_NEWPID);
101125 /* CAP_SYS_ADMIN */
102126 PyModule_AddIntConstant(m, "CLONE_NEWNET", CLONE_NEWNET);
127
128 #if PY_MAJOR_VERSION >= 3
129 return m;
130 #endif
103131 }
104132