Commit 6841879c by Guba Sándor

store-server: Syntax error UserManager script

parent 6a8ef011
......@@ -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):
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment