git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only get the hmac tag.
[nodemanager.git]
/
controller.py
diff --git
a/controller.py
b/controller.py
index
17268d2
..
1fc4847
100644
(file)
--- a/
controller.py
+++ b/
controller.py
@@
-4,6
+4,7
@@
import accounts
import logger
import tools
from pwd import getpwnam
import logger
import tools
from pwd import getpwnam
+from grp import getgrnam
class Controller(accounts.Account):
SHELL = '/usr/bin/forward_api_calls' # tunneling shell
class Controller(accounts.Account):
SHELL = '/usr/bin/forward_api_calls' # tunneling shell
@@
-12,7
+13,8
@@
class Controller(accounts.Account):
@staticmethod
def create(name, vref = None):
add_shell(Controller.SHELL)
@staticmethod
def create(name, vref = None):
add_shell(Controller.SHELL)
- logger.log_call('/usr/sbin/useradd', '-p', '*', '-s', Controller.SHELL, name)
+ group = getgrnam("slices")[2]
+ logger.log_call('/usr/sbin/useradd', '-p', '*', '-g', str(group), '-s', Controller.SHELL, name)
@staticmethod
def destroy(name): logger.log_call('/usr/sbin/userdel', '-r', name)
@staticmethod
def destroy(name): logger.log_call('/usr/sbin/userdel', '-r', name)