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
Go to the documentation of this file.
1/*
2 * Header file for server functions which perform operations on user objects.
3 *
4 * Copyright (c) 1987-2020 by the citadel.org team
5 *
6 * This program is open source software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License, version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef __USER_OPS_H__
16#define __USER_OPS_H__
17
18#include <ctype.h>
19#include <syslog.h>
20
21int hash (char *str);
22int is_aide (void);
23int is_room_aide (void);
25void rebuild_usersbynumber(void);
26void session_startup (void);
27void logged_in_response(void);
28int purge_user (char *pname);
29int getuserbyuid(struct ctdluser *usbuf, uid_t number);
30
31int create_user(char *newusername, int become_user, uid_t uid);
32enum {
35};
36#define NATIVE_AUTH_UID (-1)
37
38void do_login(void);
39int CtdlInvtKick(char *iuser, int op);
40void ForEachUser(void (*CallBack) (char *, void *out_data), void *in_data);
41int NewMailCount(void);
42int InitialMailCheck(void);
43void put_visit(visit *newvisit);
44/* MailboxName is deprecated us CtdlMailboxName instead */
45void MailboxName(char *buf, size_t n, const struct ctdluser *who,
46 const char *prefix) __attribute__ ((deprecated));
47int GenerateRelationshipIndex( char *IndexBuf,
48 long RoomID,
49 long RoomGen,
50 long UserID);
51int CtdlAssociateSystemUser(char *screenname, char *loginname);
52
53
54
55
56void CtdlSetPassword(char *new_pw);
57
58int CtdlForgetThisRoom(void);
59
60void cmd_newu (char *cmdbuf);
61void start_chkpwd_daemon(void);
62
63
64#define RENAMEUSER_OK 0 /* Operation succeeded */
65#define RENAMEUSER_LOGGED_IN 1 /* Cannot rename a user who is currently logged in */
66#define RENAMEUSER_NOT_FOUND 2 /* The old user name does not exist */
67#define RENAMEUSER_ALREADY_EXISTS 3 /* An account with the desired new name already exists */
68
69int rename_user(char *oldname, char *newname);
70void reindex_user_928(char *username, void *out_data);
71
72void makeuserkey(char *key, const char *username);
73int CtdlUserCmp(char *s1, char *s2);
74int internal_create_user(char *username, struct ctdluser *usbuf, uid_t uid);
75
76#endif
struct ctdluser usbuf
Definition: serv_migrate.c:496
void ForEachUser(void(*CallBack)(char *, void *out_data), void *in_data)
Definition: user_ops.c:1206
int internal_create_user(char *username, struct ctdluser *usbuf, uid_t uid)
Definition: user_ops.c:1018
void CtdlSetPassword(char *new_pw)
Definition: user_ops.c:1126
void do_login(void)
Definition: user_ops.c:662
int CtdlUserCmp(char *s1, char *s2)
Definition: user_ops.c:63
int is_aide(void)
Definition: user_ops.c:429
void MailboxName(char *buf, size_t n, const struct ctdluser *who, const char *prefix)
Definition: user_ops.c:357
int InitialMailCheck(void)
Definition: user_ops.c:1266
void rebuild_usersbynumber(void)
Definition: user_ops.c:496
void reindex_user_928(char *username, void *out_data)
Definition: user_ops.c:232
int NewMailCount(void)
Definition: user_ops.c:1254
int getuserbyuid(struct ctdluser *usbuf, uid_t number)
Definition: user_ops.c:507
int CtdlAssociateSystemUser(char *screenname, char *loginname)
int create_user(char *newusername, int become_user, uid_t uid)
Definition: user_ops.c:1065
int purge_user(char *pname)
int CtdlForgetThisRoom(void)
Definition: user_ops.c:1178
int GenerateRelationshipIndex(char *IndexBuf, long RoomID, long RoomGen, long UserID)
Definition: user_ops.c:264
int CtdlCheckInternetMailPermission(struct ctdluser *who)
Definition: user_ops.c:367
int is_room_aide(void)
Definition: user_ops.c:441
void put_visit(visit *newvisit)
Definition: user_ops.c:287
int CtdlInvtKick(char *iuser, int op)
Definition: user_ops.c:1142
void makeuserkey(char *key, const char *username)
Definition: user_ops.c:40
int rename_user(char *oldname, char *newname)
Definition: user_ops.c:160
void logged_in_response(void)
Definition: user_ops.c:739
void start_chkpwd_daemon(void)
Definition: chkpw.c:68
@ CREATE_USER_BECOME_USER
Definition: user_ops.h:34
@ CREATE_USER_DO_NOT_BECOME_USER
Definition: user_ops.h:33
int hash(char *str)
void cmd_newu(char *cmdbuf)
Definition: serv_user.c:93
void session_startup(void)