About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

user_ops.c File Reference
#include <stdlib.h>
#include <unistd.h>
#include "sysdep.h"
#include <stdio.h>
#include <sys/stat.h>
#include <libcitadel.h>
#include "control.h"
#include "support.h"
#include "citserver.h"
#include "config.h"
#include "citadel_ldap.h"
#include "ctdl_module.h"
#include "user_ops.h"
#include "internet_addressing.h"
Include dependency graph for user_ops.c:

Go to the source code of this file.


void makeuserkey (char *key, const char *username)
int CtdlUserCmp (char *s1, char *s2)
int CtdlGetUser (struct ctdluser *usbuf, char *name)
int CtdlLockGetCurrentUser (void)
int CtdlGetUserLock (struct ctdluser *usbuf, char *name)
void CtdlPutUser (struct ctdluser *usbuf)
void CtdlPutCurrentUserLock ()
void CtdlPutUserLock (struct ctdluser *usbuf)
int rename_user (char *oldname, char *newname)
void makeuserkey_pre928 (char *key, const char *username)
void reindex_user_928 (char *username, void *out_data)
int GenerateRelationshipIndex (char *IndexBuf, long RoomID, long RoomGen, long UserID)
void put_visit (visit *newvisit)
void CtdlSetRelationship (visit *newvisit, struct ctdluser *rel_user, struct ctdlroom *rel_room)
void CtdlGetRelationship (visit *vbuf, struct ctdluser *rel_user, struct ctdlroom *rel_room)
void CtdlMailboxName (char *buf, size_t n, const struct ctdluser *who, const char *prefix)
void MailboxName (char *buf, size_t n, const struct ctdluser *who, const char *prefix)
int CtdlCheckInternetMailPermission (struct ctdluser *who)
int CtdlAccessCheck (int required_level)
int is_aide (void)
int is_room_aide (void)
int CtdlGetUserByNumber (struct ctdluser *usbuf, long number)
void rebuild_ubn_for_user (char *username, void *data)
void rebuild_usersbynumber (void)
int getuserbyuid (struct ctdluser *usbuf, uid_t number)
int CtdlLoginExistingUser (const char *trythisname)
void do_login (void)
void logged_in_response (void)
void CtdlUserLogout (void)
static int validpw (uid_t uid, const char *pass)
void start_chkpwd_daemon (void)
int CtdlTryPassword (const char *password, long len)
int purge_user (char pname[])
int internal_create_user (char *username, struct ctdluser *usbuf, uid_t uid)
int create_user (char *username, int become_user, uid_t uid)
void CtdlSetPassword (char *new_pw)
int CtdlInvtKick (char *iuser, int op)
int CtdlForgetThisRoom (void)
void ForEachUser (void(*CallBack)(char *, void *out_data), void *in_data)
int NewMailCount ()
int InitialMailCheck ()


int chkpwd_write_pipe [2]
int chkpwd_read_pipe [2]

Function Documentation

◆ create_user()

◆ CtdlAccessCheck()

◆ CtdlCheckInternetMailPermission()

int CtdlCheckInternetMailPermission ( struct ctdluser who)

Definition at line 367 of file user_ops.c.

References ctdluser::axlevel, CtdlGetConfigInt(), ctdluser::flags, and US_INTERNET.

Referenced by cmd_ent0(), and smtp_rcpt().

◆ CtdlForgetThisRoom()

◆ CtdlGetRelationship()

◆ CtdlGetUser()

◆ CtdlGetUserByNumber()

◆ CtdlGetUserLock()

◆ CtdlInvtKick()

int CtdlInvtKick ( char *  iuser,
int  op 

◆ CtdlLockGetCurrentUser()

int CtdlLockGetCurrentUser ( void  )

◆ CtdlLoginExistingUser()

◆ CtdlMailboxName()

◆ CtdlPutCurrentUserLock()

void CtdlPutCurrentUserLock ( void  )

Definition at line 138 of file user_ops.c.

References CC, and CtdlPutUser().

Referenced by cmd_setu(), cmd_slrp(), CtdlSubmitMsg(), pop3_update(), and vcard_upload_aftersave().

◆ CtdlPutUser()

◆ CtdlPutUserLock()

◆ CtdlSetPassword()

void CtdlSetPassword ( char *  new_pw)

◆ CtdlSetRelationship()

◆ CtdlTryPassword()

◆ CtdlUserCmp()

int CtdlUserCmp ( char *  s1,
char *  s2 

Definition at line 63 of file user_ops.c.

References makeuserkey(), and USERNAME_SIZE.

Referenced by cmd_asea().

◆ CtdlUserLogout()

◆ do_login()

◆ ForEachUser()

◆ GenerateRelationshipIndex()

int GenerateRelationshipIndex ( char *  IndexBuf,
long  RoomID,
long  RoomGen,
long  UserID 

Definition at line 264 of file user_ops.c.

Referenced by CtdlGetRelationship(), PurgeVisits(), and put_visit().

◆ getuserbyuid()

int getuserbyuid ( struct ctdluser usbuf,
uid_t  number 

Definition at line 507 of file user_ops.c.

References CDB_EXTAUTH, cdb_fetch(), cdb_free(), CtdlGetUserByNumber(), cdbdata::ptr, and usbuf.

Referenced by CtdlLoginExistingUser().

◆ InitialMailCheck()

◆ internal_create_user()

◆ is_aide()

int is_aide ( void  )

Definition at line 429 of file user_ops.c.

References CC.

Referenced by CtdlForgetThisRoom().

◆ is_room_aide()

◆ logged_in_response()

void logged_in_response ( void  )

Definition at line 739 of file user_ops.c.

References CC, CIT_OK, and cprintf().

Referenced by cmd_newu(), cmd_oidf(), and cmd_pass().

◆ MailboxName()

void MailboxName ( char *  buf,
size_t  n,
const struct ctdluser who,
const char *  prefix 

Definition at line 357 of file user_ops.c.

References snprintf(), and ctdluser::usernum.

Referenced by imap_listroom().

◆ makeuserkey()

void makeuserkey ( char *  key,
const char *  username 

◆ makeuserkey_pre928()

void makeuserkey_pre928 ( char *  key,
const char *  username 

Definition at line 213 of file user_ops.c.


Referenced by reindex_user_928().

◆ NewMailCount()

int NewMailCount ( void  )

Definition at line 1254 of file user_ops.c.

References CC.

Referenced by CtdlUserGoto().

◆ purge_user()

◆ put_visit()

void put_visit ( visit newvisit)

◆ rebuild_ubn_for_user()

void rebuild_ubn_for_user ( char *  username,
void *  data 

◆ rebuild_usersbynumber()

void rebuild_usersbynumber ( void  )

Definition at line 496 of file user_ops.c.

References cdb_trunc(), CDB_USERSBYNUMBER, ForEachUser(), and rebuild_ubn_for_user().

Referenced by migr_do_import(), and pre_startup_upgrades().

◆ reindex_user_928()

void reindex_user_928 ( char *  username,
void *  out_data 

◆ rename_user()

◆ start_chkpwd_daemon()

void start_chkpwd_daemon ( void  )

Definition at line 833 of file user_ops.c.

References chkpwd_read_pipe, chkpwd_write_pipe, and file_chkpwd.

◆ validpw()

static int validpw ( uid_t  uid,
const char *  pass 

Variable Documentation

◆ chkpwd_read_pipe

int chkpwd_read_pipe[2]

Definition at line 32 of file user_ops.c.

Referenced by start_chkpwd_daemon(), and validpw().

◆ chkpwd_write_pipe

int chkpwd_write_pipe[2]

Definition at line 31 of file user_ops.c.

Referenced by start_chkpwd_daemon(), and validpw().