mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #49846 from rallytime/bp-49650
Back-port #49650 and #49827 to 2018.3
This commit is contained in:
commit
93d064add1
2 changed files with 3 additions and 2 deletions
|
@ -50,6 +50,7 @@ from salt.exceptions import (
|
|||
SaltCloudExecutionFailure,
|
||||
SaltCloudExecutionTimeout
|
||||
)
|
||||
from salt.utils.stringutils import to_bytes
|
||||
|
||||
# Import 3rd-party libs
|
||||
from salt.ext import six
|
||||
|
@ -770,7 +771,7 @@ def _compute_signature(parameters, access_key_secret):
|
|||
# All aliyun API only support GET method
|
||||
stringToSign = 'GET&%2F&' + percent_encode(canonicalizedQueryString[1:])
|
||||
|
||||
h = hmac.new(access_key_secret + "&", stringToSign, sha1)
|
||||
h = hmac.new(to_bytes(access_key_secret + "&"), stringToSign, sha1)
|
||||
signature = base64.encodestring(h.digest()).strip()
|
||||
return signature
|
||||
|
||||
|
|
|
@ -4467,7 +4467,7 @@ def check_perms(name, ret, user, group, mode, attrs=None, follow_symlinks=False)
|
|||
try:
|
||||
lattrs = lsattr(name)
|
||||
except SaltInvocationError:
|
||||
lsattrs = None
|
||||
lattrs = None
|
||||
if lattrs is not None:
|
||||
# List attributes on file
|
||||
perms['lattrs'] = ''.join(lattrs.get(name, ''))
|
||||
|
|
Loading…
Add table
Reference in a new issue