citadel
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.h File Reference
#include <ctype.h>
#include <syslog.h>
Include dependency graph for user_ops.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NATIVE_AUTH_UID   (-1)
 
#define RENAMEUSER_OK   0 /* Operation succeeded */
 
#define RENAMEUSER_LOGGED_IN   1 /* Cannot rename a user who is currently logged in */
 
#define RENAMEUSER_NOT_FOUND   2 /* The old user name does not exist */
 
#define RENAMEUSER_ALREADY_EXISTS   3 /* An account with the desired new name already exists */
 

Enumerations

enum  { CREATE_USER_DO_NOT_BECOME_USER , CREATE_USER_BECOME_USER }
 

Functions

int hash (char *str)
 
int is_aide (void)
 
int is_room_aide (void)
 
int CtdlCheckInternetMailPermission (struct ctdluser *who)
 
void rebuild_usersbynumber (void)
 
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)
 
void do_login (void)
 
int CtdlInvtKick (char *iuser, int op)
 
void ForEachUser (void(*CallBack)(char *, void *out_data), void *in_data)
 
int NewMailCount (void)
 
int InitialMailCheck (void)
 
void put_visit (visit *newvisit)
 
void MailboxName (char *buf, size_t n, const struct ctdluser *who, const char *prefix)
 
int GenerateRelationshipIndex (char *IndexBuf, long RoomID, long RoomGen, long UserID)
 
int CtdlAssociateSystemUser (char *screenname, char *loginname)
 
void CtdlSetPassword (char *new_pw)
 
int CtdlForgetThisRoom (void)
 
void cmd_newu (char *cmdbuf)
 
void start_chkpwd_daemon (void)
 
int rename_user (char *oldname, char *newname)
 
void reindex_user_928 (char *username, void *out_data)
 
void makeuserkey (char *key, const char *username)
 
int CtdlUserCmp (char *s1, char *s2)
 
int internal_create_user (char *username, struct ctdluser *usbuf, uid_t uid)
 

Macro Definition Documentation

◆ NATIVE_AUTH_UID

#define NATIVE_AUTH_UID   (-1)

Definition at line 36 of file user_ops.h.

◆ RENAMEUSER_ALREADY_EXISTS

#define RENAMEUSER_ALREADY_EXISTS   3 /* An account with the desired new name already exists */

Definition at line 67 of file user_ops.h.

◆ RENAMEUSER_LOGGED_IN

#define RENAMEUSER_LOGGED_IN   1 /* Cannot rename a user who is currently logged in */

Definition at line 65 of file user_ops.h.

◆ RENAMEUSER_NOT_FOUND

#define RENAMEUSER_NOT_FOUND   2 /* The old user name does not exist */

Definition at line 66 of file user_ops.h.

◆ RENAMEUSER_OK

#define RENAMEUSER_OK   0 /* Operation succeeded */

Definition at line 64 of file user_ops.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CREATE_USER_DO_NOT_BECOME_USER 
CREATE_USER_BECOME_USER 

Definition at line 32 of file user_ops.h.

Function Documentation

◆ cmd_newu()

◆ create_user()

◆ CtdlAssociateSystemUser()

int CtdlAssociateSystemUser ( char *  screenname,
char *  loginname 
)

◆ 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()

◆ CtdlInvtKick()

int CtdlInvtKick ( char *  iuser,
int  op 
)

◆ CtdlSetPassword()

void CtdlSetPassword ( char *  new_pw)

◆ 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().

◆ 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().

◆ hash()

int hash ( char *  str)

◆ 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 
)

◆ NewMailCount()

int NewMailCount ( void  )

Definition at line 1254 of file user_ops.c.

References CC.

Referenced by CtdlUserGoto().

◆ purge_user()

int purge_user ( char *  pname)

◆ put_visit()

void put_visit ( visit newvisit)

◆ 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()

◆ session_startup()

void session_startup ( void  )

◆ start_chkpwd_daemon()

void start_chkpwd_daemon ( void  )

Definition at line 68 of file chkpw.c.

References chkpwd_read_pipe, chkpwd_write_pipe, and file_chkpwd.

Referenced by main().