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)  

Loading...
Searching...
No Matches
user_ops.h
Go to the documentation of this file.
1// Header file for server functions which perform operations on user objects.
2//
3// Copyright (c) 1987-2022 by the citadel.org team
4//
5// This program is open source software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License, version 3.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12
13#ifndef __USER_OPS_H__
14#define __USER_OPS_H__
15
16#include <ctype.h>
17#include <syslog.h>
18
19int hash (char *str);
20int is_aide (void);
21int is_room_aide (void);
23void rebuild_usersbynumber(void);
24void session_startup (void);
25void logged_in_response(void);
26int purge_user (char *pname);
27int getuserbyuid(struct ctdluser *usbuf, uid_t number);
28
29int create_user(char *newusername, int become_user, uid_t uid);
30enum {
33};
34#define NATIVE_AUTH_UID (-1)
35
36void do_login(void);
37int CtdlInvtKick(char *iuser, int op);
38void ForEachUser(void (*CallBack) (char *, void *out_data), void *in_data);
39int NewMailCount(void);
40int InitialMailCheck(void);
41void put_visit(visit *newvisit);
42int GenerateRelationshipIndex(char *IndexBuf, long RoomID, long RoomGen, long UserID);
43int CtdlAssociateSystemUser(char *screenname, char *loginname);
44
45void CtdlSetPassword(char *new_pw);
46
47int CtdlForgetThisRoom(void);
48
49void cmd_newu (char *cmdbuf);
50void start_chkpwd_daemon(void);
51
52
53#define RENAMEUSER_OK 0 // Operation succeeded
54#define RENAMEUSER_LOGGED_IN 1 // Cannot rename a user who is currently logged in
55#define RENAMEUSER_NOT_FOUND 2 // The old user name does not exist
56#define RENAMEUSER_ALREADY_EXISTS 3 // An account with the desired new name already exists
57
58int rename_user(char *oldname, char *newname);
59void reindex_user_928(char *username, void *out_data);
60
61void makeuserkey(char *key, const char *username);
62int CtdlUserCmp(char *s1, char *s2);
63int internal_create_user(char *username, struct ctdluser *usbuf, uid_t uid);
64
65#endif
struct ctdluser usbuf
Definition: serv_migrate.c:496
void ForEachUser(void(*CallBack)(char *, void *out_data), void *in_data)
Definition: user_ops.c:1077
@ CREATE_USER_BECOME_USER
Definition: user_ops.h:32
@ CREATE_USER_DO_NOT_BECOME_USER
Definition: user_ops.h:31
int internal_create_user(char *username, struct ctdluser *usbuf, uid_t uid)
Definition: user_ops.c:905
void CtdlSetPassword(char *new_pw)
Definition: user_ops.c:1004
void do_login(void)
Definition: user_ops.c:581
int CtdlUserCmp(char *s1, char *s2)
Definition: user_ops.c:52
int is_aide(void)
Definition: user_ops.c:371
int InitialMailCheck(void)
Definition: user_ops.c:1131
void rebuild_usersbynumber(void)
Definition: user_ops.c:427
void reindex_user_928(char *username, void *out_data)
Definition: user_ops.c:198
int NewMailCount(void)
Definition: user_ops.c:1122
int getuserbyuid(struct ctdluser *usbuf, uid_t number)
Definition: user_ops.c:436
int CtdlAssociateSystemUser(char *screenname, char *loginname)
int create_user(char *newusername, int become_user, uid_t uid)
Definition: user_ops.c:949
int purge_user(char *pname)
int CtdlForgetThisRoom(void)
Definition: user_ops.c:1051
int GenerateRelationshipIndex(char *IndexBuf, long RoomID, long RoomGen, long UserID)
Definition: user_ops.c:228
int CtdlCheckInternetMailPermission(struct ctdluser *who)
Definition: user_ops.c:312
int is_room_aide(void)
Definition: user_ops.c:382
void put_visit(visit *newvisit)
Definition: user_ops.c:249
int CtdlInvtKick(char *iuser, int op)
Definition: user_ops.c:1017
void makeuserkey(char *key, const char *username)
Definition: user_ops.c:31
int rename_user(char *oldname, char *newname)
Definition: user_ops.c:129
void logged_in_response(void)
Definition: user_ops.c:651
void start_chkpwd_daemon(void)
Definition: user_ops.c:735
int hash(char *str)
void cmd_newu(char *cmdbuf)
Definition: serv_user.c:83
void session_startup(void)