Revision 5bae14d9
b/lib/constants.py | ||
---|---|---|
90 | 90 |
DISK_LINKS_DIR = RUN_GANETI_DIR + "/instance-disks" |
91 | 91 |
RUN_DIRS_MODE = 0755 |
92 | 92 |
SOCKET_DIR = RUN_GANETI_DIR + "/socket" |
93 |
SOCKET_DIR_MODE = 0700 |
|
93 |
SECURE_DIR_MODE = 0700 |
|
94 |
SOCKET_DIR_MODE = SECURE_DIR_MODE |
|
94 | 95 |
# keep RUN_GANETI_DIR first here, to make sure all get created when the node |
95 | 96 |
# daemon is started (this takes care of RUN_DIR being tmpfs) |
96 | 97 |
SUB_RUN_DIRS = [ RUN_GANETI_DIR, BDEV_CACHE_DIR, DISK_LINKS_DIR ] |
... | ... | |
620 | 621 |
JOB_QUEUE_SIZE_HARD_LIMIT = 5000 |
621 | 622 |
JOB_QUEUE_SIZE_SOFT_LIMIT = JOB_QUEUE_SIZE_HARD_LIMIT * 0.8 |
622 | 623 |
JOB_QUEUE_DIRS = [QUEUE_DIR, JOB_QUEUE_ARCHIVE_DIR] |
623 |
JOB_QUEUE_DIRS_MODE = 0700
|
|
624 |
JOB_QUEUE_DIRS_MODE = SECURE_DIR_MODE
|
|
624 | 625 |
|
625 | 626 |
JOB_ID_TEMPLATE = r"\d+" |
626 | 627 |
|
b/lib/ssh.py | ||
---|---|---|
53 | 53 |
raise errors.OpExecError("Cannot resolve home of user %s" % user) |
54 | 54 |
|
55 | 55 |
ssh_dir = utils.PathJoin(user_dir, ".ssh") |
56 |
if not os.path.lexists(ssh_dir): |
|
57 |
if mkdir: |
|
58 |
try: |
|
59 |
os.mkdir(ssh_dir, 0700) |
|
60 |
except EnvironmentError, err: |
|
61 |
raise errors.OpExecError("Can't create .ssh dir for user %s: %s" % |
|
62 |
(user, str(err))) |
|
56 |
if mkdir: |
|
57 |
utils.EnsureDirs([(ssh_dir, constants.SECURE_DIR_MODE)]) |
|
63 | 58 |
elif not os.path.isdir(ssh_dir): |
64 | 59 |
raise errors.OpExecError("path ~%s/.ssh is not a directory" % user) |
65 | 60 |
|
Also available in: Unified diff