Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6841879c
authored
Feb 10, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
store-server: Syntax error UserManager script
parent
6a8ef011
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
miscellaneous/store-server/CloudStore.py
+2
-2
miscellaneous/store-server/UserManager.sh
+2
-0
No files found.
miscellaneous/store-server/CloudStore.py
View file @
6841879c
...
...
@@ -249,8 +249,8 @@ def new_user(neptun):
print
"Invalid syntax"
abort
(
400
,
'Invalid syntax'
)
# Call user creator script
print
smbpasswd
+
" "
+
str
(
quota
)
result
=
subprocess
.
call
([
ROOT_BIN_FOLDER
+
'/'
+
USER_MANAGER
,
'add'
,
neptun
,
smbpasswd
,
str
(
quota
),
hard_quota
(
quota
)])
print
"add "
+
neptun
+
" "
+
smbpasswd
+
" "
+
str
(
quota
)
+
" "
+
hard_quota
(
quota
)
if
result
==
0
:
try
:
for
key
in
request
.
json
[
'KEYS'
]:
...
...
@@ -331,7 +331,7 @@ def upload(hash_num):
# Return hard quota from quota
def
hard_quota
(
quota
):
return
str
(
int
(
quota
*
1.25
))
return
str
(
int
(
int
(
quota
)
*
1.25
))
# Define filebuffer for big uploads
def
fbuffer
(
f
,
chunk_size
=
4096
):
...
...
miscellaneous/store-server/UserManager.sh
View file @
6841879c
...
...
@@ -18,6 +18,8 @@ umask 022
fi
case
$COMMAND
in
'add'
)
SOFT_QUOTA
=
"
$4
"
HARD_QUOTA
=
"
$5
"
if
[
"x
${
SMB_PASSWD
}
"
==
"x"
]
;
then
exit
1
fi
...
...
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