(getMpwuid): Bugfix. It should take a pointer as its argument
Showing
2 changed files
with
3 additions
and
3 deletions
... | @@ -171,7 +171,7 @@ getMpwnam (const char *username) | ... | @@ -171,7 +171,7 @@ getMpwnam (const char *username) |
171 | } | 171 | } |
172 | 172 | ||
173 | struct passwd * | 173 | struct passwd * |
174 | getMpwuid (uid_t uid) | 174 | getMpwuid (uid_t *puid) |
175 | { | 175 | { |
176 | char *QueryStr = NULL; | 176 | char *QueryStr = NULL; |
177 | MYSQL *m; | 177 | MYSQL *m; |
... | @@ -202,7 +202,7 @@ getMpwuid (uid_t uid) | ... | @@ -202,7 +202,7 @@ getMpwuid (uid_t uid) |
202 | return NULL; | 202 | return NULL; |
203 | } | 203 | } |
204 | 204 | ||
205 | snprintf (uidstr, sizeof (uidstr), "%u", uid); | 205 | snprintf (uidstr, sizeof (uidstr), "%u", *puid); |
206 | QueryStr = sql_expand_query (sql_getpwuid_query, uidstr); | 206 | QueryStr = sql_expand_query (sql_getpwuid_query, uidstr); |
207 | 207 | ||
208 | if (!QueryStr) | 208 | if (!QueryStr) | ... | ... |
... | @@ -12,7 +12,7 @@ extern char *sql_socket; | ... | @@ -12,7 +12,7 @@ extern char *sql_socket; |
12 | extern int sql_port; | 12 | extern int sql_port; |
13 | 13 | ||
14 | struct passwd *getMpwnam (const char *username); | 14 | struct passwd *getMpwnam (const char *username); |
15 | struct passwd *getMpwuid (uid_t uid); | 15 | struct passwd *getMpwuid (uid_t *puid); |
16 | struct spwd *getMspnam (const char *username); | 16 | struct spwd *getMspnam (const char *username); |
17 | 17 | ||
18 | #define MHOST NULL /* Hostname to connect to. NULL for UNIX | 18 | #define MHOST NULL /* Hostname to connect to. NULL for UNIX | ... | ... |
-
Please register or sign in to post a comment