-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mdb iamproxy auth support #561
Conversation
sources/mdb_iamproxy.c
Outdated
uint64_t msg_size = sizeof(body_size) + body_size; | ||
uint64_t sent = 0; // stores byte-size of sended info | ||
char *msg = (char *)calloc( | ||
msg_size, sizeof(*msg)); // allocate memory for msg buffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sizeof(char) == 1 by C standard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but what's incorrect here? i think it's common to allocate dynamic memory in that way
type *mem = calloc(n, sizeof(*mem)); its easily to read, and remove nubmers/random (for common code reader) constants from code
But if necessary, I can fix it
sources/auth.c
Outdated
msg = od_read(&client->io, UINT32_MAX); | ||
if (msg == NULL) { | ||
od_error(&instance->logger, "auth", client, NULL, | ||
"fuck that shit again"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be polite, the Internet remembers all
…in od_log at the end of mdb_iamproxy_authenticate_user
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's avoid spurrious changes
#define MDB_IAMPROXY_DEFAULT_SOCKET_FILE \ | ||
"/var/run/iam-auth-proxy/iam-auth-proxy.sock" // PAM SOCKET FILE place | ||
|
||
void put_header(char dst[], uint64_t src) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's mark these as static.
Generaly we do all the formatting stuff in KiWi... it's kind of byte-formatting lib.
No description provided.