projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a82444
)
A little more work on the LDAP Sync
author
Art Cancro
<ajc@citadel.org>
Sun, 19 Nov 2017 21:34:04 +0000
(16:34 -0500)
committer
Art Cancro
<ajc@citadel.org>
Sun, 19 Nov 2017 21:34:04 +0000
(16:34 -0500)
citadel/ldap.c
patch
|
blob
|
history
citadel/user_ops.h
patch
|
blob
|
history
diff --git
a/citadel/ldap.c
b/citadel/ldap.c
index 7a5b18060d06affd8754a44260cba640b74c15e3..f4bffb0aa3240c69ce77c5d614249e89c19bf07e 100644
(file)
--- a/
citadel/ldap.c
+++ b/
citadel/ldap.c
@@
-600,6
+600,16
@@
void CtdlSynchronizeUsersFromLDAP(void)
syslog(LOG_DEBUG, "\033[33mldap: display name: <%s> , uid = <%d>\033[0m", fullname, uid);
// FIXME now create or update the user
syslog(LOG_DEBUG, "\033[33mldap: display name: <%s> , uid = <%d>\033[0m", fullname, uid);
// FIXME now create or update the user
+ int i;
+ struct ctdluser usbuf;
+
+ i = getuserbyuid(&usbuf, uid);
+ if (i == 0) {
+ syslog(LOG_DEBUG, "\033[32m...and that user EXISTZ0RS!!!\033[0m");
+ }
+ else {
+ syslog(LOG_DEBUG, "\033[31m...and that user D0EZ N0T EXISTZ0R!!\033[0m");
+ }
}
}
diff --git
a/citadel/user_ops.h
b/citadel/user_ops.h
index 146a0eed5b68d66eb99478954e6f4f0c8aaf6a9c..44cf771e6337cf4efc05cb98335b8b0d9c590221 100644
(file)
--- a/
citadel/user_ops.h
+++ b/
citadel/user_ops.h
@@
-12,6
+12,7
@@
void rebuild_usersbynumber(void);
void session_startup (void);
void logged_in_response(void);
int purge_user (char *pname);
void session_startup (void);
void logged_in_response(void);
int purge_user (char *pname);
+int getuserbyuid(struct ctdluser *usbuf, uid_t number);
int create_user(char *newusername, int become_user, uid_t uid);
enum {
int create_user(char *newusername, int become_user, uid_t uid);
enum {
@@
-22,8
+23,7
@@
enum {
void do_login(void);
int CtdlInvtKick(char *iuser, int op);
void do_login(void);
int CtdlInvtKick(char *iuser, int op);
-void ForEachUser(void (*CallBack)(struct ctdluser *EachUser, void *out_data),
- void *in_data);
+void ForEachUser(void (*CallBack)(struct ctdluser *EachUser, void *out_data), void *in_data);
void ListThisUser(struct ctdluser *usbuf, void *data);
int NewMailCount(void);
int InitialMailCheck(void);
void ListThisUser(struct ctdluser *usbuf, void *data);
int NewMailCount(void);
int InitialMailCheck(void);