MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ACLUpdateDefaultUserPassword

Function ACLUpdateDefaultUserPassword

src/acl.cpp:2292–2301  ·  view source on GitHub ↗

Set the password for the "default" ACL user. This implements supports for * requirepass config, so passing in NULL will set the user to be nopass. */

Source from the content-addressed store, hash-verified

2290/* Set the password for the "default" ACL user. This implements supports for
2291 * requirepass config, so passing in NULL will set the user to be nopass. */
2292void ACLUpdateDefaultUserPassword(sds password) {
2293 ACLSetUser(DefaultUser,"resetpass",-1);
2294 if (password) {
2295 sds aclop = sdscatlen(sdsnew(">"), password, sdslen(password));
2296 ACLSetUser(DefaultUser,aclop,sdslen(aclop));
2297 sdsfree(aclop);
2298 } else {
2299 ACLSetUser(DefaultUser,"nopass",-1);
2300 }
2301}

Callers 2

initServerFunction · 0.85
updateRequirePassFunction · 0.85

Calls 5

ACLSetUserFunction · 0.85
sdscatlenFunction · 0.85
sdsnewFunction · 0.85
sdslenFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected