Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
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):
...
@@ -249,8 +249,8 @@ def new_user(neptun):
print
"Invalid syntax"
print
"Invalid syntax"
abort
(
400
,
'Invalid syntax'
)
abort
(
400
,
'Invalid syntax'
)
# Call user creator script
# Call user creator script
print
smbpasswd
+
" "
+
str
(
quota
)
result
=
subprocess
.
call
([
ROOT_BIN_FOLDER
+
'/'
+
USER_MANAGER
,
'add'
,
neptun
,
smbpasswd
,
str
(
quota
),
hard_quota
(
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
:
if
result
==
0
:
try
:
try
:
for
key
in
request
.
json
[
'KEYS'
]:
for
key
in
request
.
json
[
'KEYS'
]:
...
@@ -331,7 +331,7 @@ def upload(hash_num):
...
@@ -331,7 +331,7 @@ def upload(hash_num):
# Return hard quota from quota
# Return hard quota from quota
def
hard_quota
(
quota
):
def
hard_quota
(
quota
):
return
str
(
int
(
quota
*
1.25
))
return
str
(
int
(
int
(
quota
)
*
1.25
))
# Define filebuffer for big uploads
# Define filebuffer for big uploads
def
fbuffer
(
f
,
chunk_size
=
4096
):
def
fbuffer
(
f
,
chunk_size
=
4096
):
...
...
miscellaneous/store-server/UserManager.sh
View file @
6841879c
...
@@ -18,6 +18,8 @@ umask 022
...
@@ -18,6 +18,8 @@ umask 022
fi
fi
case
$COMMAND
in
case
$COMMAND
in
'add'
)
'add'
)
SOFT_QUOTA
=
"
$4
"
HARD_QUOTA
=
"
$5
"
if
[
"x
${
SMB_PASSWD
}
"
==
"x"
]
;
then
if
[
"x
${
SMB_PASSWD
}
"
==
"x"
]
;
then
exit
1
exit
1
fi
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