Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a0a4fb85
Commit
a0a4fb85
authored
Jan 14, 2019
by
antirez
Browse files
ACL: Fix compilation by adding prototype and c->cmd fix.
parent
2da2e452
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
a0a4fb85
...
@@ -2690,7 +2690,7 @@ int processCommand(client *c) {
...
@@ -2690,7 +2690,7 @@ int processCommand(client *c) {
/* Check if the user can run this command according to the current
/* Check if the user can run this command according to the current
* ACLs. */
* ACLs. */
if
(
ACLCheckCommandPerm
(
c
)
==
C_ERR
)
{
if
(
ACLCheckCommandPerm
(
c
)
==
C_ERR
)
{
addReplyErrorFormat
(
c
,
"-NOPERM this user has no permissions to run the %s command"
,
cmd
->
name
);
addReplyErrorFormat
(
c
,
"-NOPERM this user has no permissions to run the %s command"
,
c
->
cmd
->
name
);
}
}
/* Only allow a subset of commands in the context of Pub/Sub if the
/* Only allow a subset of commands in the context of Pub/Sub if the
...
...
src/server.h
View file @
a0a4fb85
...
@@ -1693,6 +1693,7 @@ void ACLInit(void);
...
@@ -1693,6 +1693,7 @@ void ACLInit(void);
int
ACLCheckUserCredentials
(
robj
*
username
,
robj
*
password
);
int
ACLCheckUserCredentials
(
robj
*
username
,
robj
*
password
);
unsigned
long
ACLGetCommandID
(
const
char
*
cmdname
);
unsigned
long
ACLGetCommandID
(
const
char
*
cmdname
);
user
*
ACLGetUserByName
(
const
char
*
name
,
size_t
namelen
);
user
*
ACLGetUserByName
(
const
char
*
name
,
size_t
namelen
);
int
ACLCheckCommandPerm
(
client
*
c
);
/* Sorted sets data type */
/* Sorted sets data type */
...
...
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