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
serv_upgrade.c
Go to the documentation of this file.
1// Transparently handle the upgrading of server data formats. If we see
2// an existing version number of our database, we can make some intelligent
3// guesses about what kind of data format changes need to be applied, and
4// we apply them transparently.
5//
6// Copyright (c) 1987-2022 by the citadel.org team
7//
8// This program is open source software; you can redistribute it and/or
9// modify it under the terms of the GNU General Public License version 3.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16#include "../../sysdep.h"
17#include <stdlib.h>
18#include <unistd.h>
19#include <stdio.h>
20#include <fcntl.h>
21#include <signal.h>
22#include <pwd.h>
23#include <errno.h>
24#include <sys/types.h>
25#include <time.h>
26#include <sys/wait.h>
27#include <string.h>
28#include <limits.h>
29#include <libcitadel.h>
30#include "../../citadel.h"
31#include "../../server.h"
32#include "../../citserver.h"
33#include "../../support.h"
34#include "../../config.h"
35#include "../../control.h"
36#include "../../database.h"
37#include "../../user_ops.h"
38#include "../../msgbase.h"
39#include "serv_upgrade.h"
40#include "../../euidindex.h"
41#include "../../ctdl_module.h"
42#include "../../serv_vcard.h"
43#include "../../internet_addressing.h"
44
45// oldver is the version number of Citadel Server which was active on the previous run of the program, learned from the system configuration.
46// If we are running a new Citadel Server for the first time, oldver will be 0.
47// We keep this value around for the entire duration of the program run because we'll need it during several stages of startup.
48int oldver = 0;
49
50// Try to remove any extra users with number 0
52 struct ctdluser usbuf;
53 char usernamekey[USERNAME_SIZE];
54
55 while (CtdlGetUserByNumber(&usbuf, 0) == 0) {
56 // delete user with number 0 and no name
57 if (IsEmptyStr(usbuf.fullname)) {
58 cdb_delete(CDB_USERS, "", 0);
59 }
60 else {
61 // temporarily set this user to -1
62 usbuf.usernum = -1;
64 }
65 }
66
67 // Delete any "user 0" accounts
68 while (CtdlGetUserByNumber(&usbuf, -1) == 0) {
69 makeuserkey(usernamekey, usbuf.fullname);
70 cdb_delete(CDB_USERS, usernamekey, strlen(usernamekey));
71 }
72}
73
74
75// Back end processing function for reindex_uids()
76void reindex_uids_backend(char *username, void *data) {
77
78 struct ctdluser us;
79
80 if (CtdlGetUserLock(&us, username) == 0) {
81 syslog(LOG_DEBUG, "Processing <%s> (%d)", us.fullname, us.uid);
82 if (us.uid == CTDLUID) {
84 }
85 CtdlPutUserLock(&us);
86 if ((us.uid > 0) && (us.uid != NATIVE_AUTH_UID)) { // if non-native auth , index by uid
87 StrBuf *claimed_id = NewStrBuf();
88 StrBufPrintf(claimed_id, "uid:%d", us.uid);
89 attach_extauth(&us, claimed_id);
90 FreeStrBuf(&claimed_id);
91 }
92 }
93}
94
95
96// Build extauth index of all users with uid-based join (system auth, LDAP auth)
97// Also changes all users with a uid of CTDLUID to NATIVE_AUTH_UID (-1)
98void reindex_uids(void) {
99 syslog(LOG_WARNING, "upgrade: reindexing and applying uid changes");
101 return;
102}
103
104
105// These accounts may have been created by code that ran between mid 2008 and early 2011.
106// If present they are no longer in use and may be deleted.
108 char *deleteusers[] = {
109 "SYS_checkpoint",
110 "SYS_extnotify",
111 "SYS_IGnet Queue",
112 "SYS_indexer",
113 "SYS_network",
114 "SYS_popclient",
115 "SYS_purger",
116 "SYS_rssclient",
117 "SYS_select_on_master",
118 "SYS_SMTP Send"
119 };
120
121 int i;
122 struct ctdluser usbuf;
123 for (i=0; i<(sizeof(deleteusers)/sizeof(char *)); ++i) {
124 if (CtdlGetUser(&usbuf, deleteusers[i]) == 0) {
125 usbuf.axlevel = 0;
126 strcpy(usbuf.password, "deleteme");
128 syslog(LOG_INFO,
129 "System user account <%s> is no longer in use and will be deleted.",
130 deleteusers[i]
131 );
132 }
133 }
134}
135
136
137// Attempt to guess the name of the time zone currently in use
138// on the underlying host system.
139void guess_time_zone(void) {
140 FILE *fp;
141 char buf[PATH_MAX];
142
143 fp = popen(file_guesstimezone, "r");
144 if (fp) {
145 if (fgets(buf, sizeof buf, fp) && (strlen(buf) > 2)) {
146 buf[strlen(buf)-1] = 0;
147 CtdlSetConfigStr("c_default_cal_zone", buf);
148 syslog(LOG_INFO, "Configuring timezone: %s", buf);
149 }
150 fclose(fp);
151 }
152}
153
154
155// Per-room callback function for ingest_old_roominfo_and_roompic_files()
156// This is the second pass, where we process the list of rooms with info or pic files.
157void iorarf_oneroom(char *roomname, char *infofile, char *picfile) {
158 FILE *fp;
159 long data_length;
160 char *unencoded_data;
161 char *encoded_data;
162 long info_msgnum = 0;
163 long pic_msgnum = 0;
164 char subject[SIZ];
165
166 // Test for the presence of a legacy "room info file"
167 if (!IsEmptyStr(infofile)) {
168 fp = fopen(infofile, "r");
169 }
170 else {
171 fp = NULL;
172 }
173 if (fp) {
174 fseek(fp, 0, SEEK_END);
175 data_length = ftell(fp);
176
177 if (data_length >= 1) {
178 rewind(fp);
179 unencoded_data = malloc(data_length);
180 if (unencoded_data) {
181 fread(unencoded_data, data_length, 1, fp);
182 encoded_data = malloc((data_length * 2) + 100);
183 if (encoded_data) {
184 sprintf(encoded_data, "Content-type: text/plain\nContent-transfer-encoding: base64\n\n");
185 CtdlEncodeBase64(&encoded_data[strlen(encoded_data)], unencoded_data, data_length, BASE64_YES_LINEBREAKS);
186 snprintf(subject, sizeof subject, "Imported room banner for %s", roomname);
187 info_msgnum = quickie_message("Citadel", NULL, NULL, SYSCONFIGROOM, encoded_data, FMT_RFC822, subject);
188 free(encoded_data);
189 }
190 free(unencoded_data);
191 }
192 }
193 fclose(fp);
194 if (info_msgnum > 0) unlink(infofile);
195 }
196
197 // Test for the presence of a legacy "room picture file" and import it.
198 if (!IsEmptyStr(picfile)) {
199 fp = fopen(picfile, "r");
200 }
201 else {
202 fp = NULL;
203 }
204 if (fp) {
205 fseek(fp, 0, SEEK_END);
206 data_length = ftell(fp);
207
208 if (data_length >= 1) {
209 rewind(fp);
210 unencoded_data = malloc(data_length);
211 if (unencoded_data) {
212 fread(unencoded_data, data_length, 1, fp);
213 encoded_data = malloc((data_length * 2) + 100);
214 if (encoded_data) {
215 sprintf(encoded_data, "Content-type: image/gif\nContent-transfer-encoding: base64\n\n");
216 CtdlEncodeBase64(&encoded_data[strlen(encoded_data)], unencoded_data, data_length, BASE64_YES_LINEBREAKS);
217 snprintf(subject, sizeof subject, "Imported room icon for %s", roomname);
218 pic_msgnum = quickie_message("Citadel", NULL, NULL, SYSCONFIGROOM, encoded_data, FMT_RFC822, subject);
219 free(encoded_data);
220 }
221 free(unencoded_data);
222 }
223 }
224 fclose(fp);
225 if (pic_msgnum > 0) unlink(picfile);
226 }
227
228 // Now we have the message numbers of our new banner and icon. Record them in the room record.
229 // NOTE: we are not deleting the old msgnum_info because that position in the record was previously
230 // a pointer to the highest message number which existed in the room when the info file was saved,
231 // and we don't want to delete messages that are not *actually* old banners.
232 struct ctdlroom qrbuf;
233 if (CtdlGetRoomLock(&qrbuf, roomname) == 0) {
234 qrbuf.msgnum_info = info_msgnum;
235 qrbuf.msgnum_pic = pic_msgnum;
237 }
238
239}
240
241
245 char info[PATH_MAX];
246 char pic[PATH_MAX];
247};
248
249
250// Per-room callback function for ingest_old_roominfo_and_roompic_files()
251// This is the first pass, where the list of qualifying rooms is gathered.
252void iorarf_backend(struct ctdlroom *qrbuf, void *data) {
253 FILE *fp;
254 struct iorarf_list **iorarf_list = (struct iorarf_list **)data;
255
256 struct iorarf_list *i = malloc(sizeof(struct iorarf_list));
257 i->next = *iorarf_list;
258 strcpy(i->name, qrbuf->QRname);
259 strcpy(i->info, "");
260 strcpy(i->pic, "");
261
262 // Test for the presence of a legacy "room info file"
264 fp = fopen(i->info, "r");
265 if (fp) {
266 fclose(fp);
267 }
268 else {
269 i->info[0] = 0;
270 }
271
272 // Test for the presence of a legacy "room picture file"
273 assoc_file_name(i->pic, sizeof i->pic, qrbuf, ctdl_image_dir);
274 fp = fopen(i->pic, "r");
275 if (fp) {
276 fclose(fp);
277 }
278 else {
279 i->pic[0] = 0;
280 }
281
282 if ( (!IsEmptyStr(i->info)) || (!IsEmptyStr(i->pic)) ) {
283 *iorarf_list = i;
284 }
285 else {
286 free(i);
287 }
288}
289
290
291// Prior to Citadel Server version 902, room info and pictures (which comprise the
292// displayed banner for each room) were stored in the filesystem. If we are upgrading
293// from version >000 to version >=902, ingest those files into the database.
295 struct iorarf_list *il = NULL;
296
298
299 struct iorarf_list *p;
300 while (il) {
301 iorarf_oneroom(il->name, il->info, il->pic);
302 p = il->next;
303 free(il);
304 il = p;
305 }
306
307 unlink(ctdl_info_dir);
308}
309
310
311// For upgrades in which a new config setting appears for the first time, set default values.
312// For new installations (oldver == 0) also set default values.
313void update_config(void) {
314
315 if (oldver < 606) {
316 CtdlSetConfigInt("c_rfc822_strict_from", 0);
317 }
318
319 if (oldver < 609) {
320 CtdlSetConfigInt("c_purge_hour", 3);
321 }
322
323 if (oldver < 615) {
324 CtdlSetConfigInt("c_ldap_port", 389);
325 }
326
327 if (oldver < 623) {
328 CtdlSetConfigStr("c_ip_addr", "*");
329 }
330
331 if (oldver < 650) {
332 CtdlSetConfigInt("c_enable_fulltext", 1);
333 }
334
335 if (oldver < 652) {
336 CtdlSetConfigInt("c_auto_cull", 1);
337 }
338
339 if (oldver < 725) {
340 CtdlSetConfigInt("c_xmpp_c2s_port", 5222);
341 CtdlSetConfigInt("c_xmpp_s2s_port", 5269);
342 }
343
344 if (oldver < 830) {
345 CtdlSetConfigInt("c_nntp_port", 119);
346 CtdlSetConfigInt("c_nntps_port", 563);
347 }
348
349 if (IsEmptyStr(CtdlGetConfigStr("c_default_cal_zone"))) {
351 }
352}
353
354
355// Helper function for move_inet_addrs_from_vcards_to_user_records()
356//
357// Call this function as a ForEachUser backend in order to queue up
358// user names, or call it with a null user to make it do the processing.
359// This allows us to maintain the list as a static instead of passing
360// pointers around.
361void miafvtur_backend(char *username, void *data) {
362 struct ctdluser usbuf;
363 char primary_inet_email[512] = { 0 };
364 char other_inet_emails[512] = { 0 };
365 char combined_inet_emails[512] = { 0 };
366
367 if (CtdlGetUser(&usbuf, username) != 0) {
368 return;
369 }
370
371 struct vCard *v = vcard_get_user(&usbuf);
372 if (!v) return;
373 extract_inet_email_addrs(primary_inet_email, sizeof primary_inet_email, other_inet_emails, sizeof other_inet_emails, v, 1);
374 vcard_free(v);
375
376 if ( (IsEmptyStr(primary_inet_email)) && (IsEmptyStr(other_inet_emails)) ) {
377 return;
378 }
379
380 snprintf(combined_inet_emails, 512, "%s%s%s",
381 (!IsEmptyStr(primary_inet_email) ? primary_inet_email : ""),
382 ((!IsEmptyStr(primary_inet_email)&&(!IsEmptyStr(other_inet_emails))) ? "|" : ""),
383 (!IsEmptyStr(other_inet_emails) ? other_inet_emails : "")
384 );
385
386 CtdlSetEmailAddressesForUser(usbuf.fullname, combined_inet_emails);
387}
388
389
390// If our system still has a "refcount_adjustments.dat" sitting around from an old version, ingest it now.
392 int r;
393 FILE *fp;
394 struct arcq arcq_rec;
395 int num_records_processed = 0;
396
397 fp = fopen(file_arcq, "rb");
398 if (fp == NULL) {
399 return(num_records_processed);
400 }
401
402 syslog(LOG_INFO, "msgbase: ingesting %s", file_arcq);
403
404 while (fread(&arcq_rec, sizeof(struct arcq), 1, fp) == 1) {
405 AdjRefCount(arcq_rec.arcq_msgnum, arcq_rec.arcq_delta);
406 ++num_records_processed;
407 }
408
409 fclose(fp);
410 r = unlink(file_arcq);
411 if (r != 0) {
412 syslog(LOG_ERR, "%s: %m", file_arcq);
413 }
414
415 return(num_records_processed);
416}
417
418
419// Prior to version 912 we kept a user's various Internet email addresses in their vCards.
420// This function moves them over to the user record, which is where we keep them now.
424}
425
426
427// We found the legacy sieve config in the user's config room. Store the message number in the user record.
428void mifm_found_config(long msgnum, void *userdata) {
429 struct ctdluser *us = (struct ctdluser *)userdata;
430
431 us->msgnum_inboxrules = msgnum;
432 syslog(LOG_DEBUG, "user: <%s> inbox filter msgnum: <%ld>", us->fullname, us->msgnum_inboxrules);
433}
434
435
436// Helper function for migrate_inbox_filter_msgnums()
437void mifm_backend(char *username, void *data) {
438 struct ctdluser us;
439 char roomname[ROOMNAMELEN];
440
441 if (CtdlGetUserLock(&us, username) == 0) {
442 // Take a spin through the user's personal config room
443 syslog(LOG_DEBUG, "Processing <%s> (%ld)", us.fullname, us.usernum);
444 snprintf(roomname, sizeof roomname, "%010ld.%s", us.usernum, USERCONFIGROOM);
445 if (CtdlGetRoom(&CC->room, roomname) == 0) {
446 CtdlForEachMessage(MSGS_LAST, 1, NULL, SIEVECONFIG, NULL, mifm_found_config, (void *)&us );
447 }
448 CtdlPutUserLock(&us);
449 }
450}
451
452
453// Prior to version 930 we used a MIME type search to locate the user's inbox filter rules.
454// This function locates those ruleset messages and simply stores the message number in the user record.
457}
458
459
460// Create a default administrator account so we can log in to a new installation
462 struct ctdluser usbuf;
463
466 safestrncpy(usbuf.password, DEFAULT_ADMIN_PASSWORD, sizeof(usbuf.password));
467 usbuf.axlevel = AxAideU;
470}
471
472
473// Based on the server version number reported by the existing database,
474// run in-place data format upgrades until everything is up to date.
476
477 oldver = CtdlGetConfigInt("MM_hosted_upgrade_level");
478 syslog(LOG_INFO, "Existing database version on disk is %d", oldver);
480
481 if (oldver < REV_LEVEL) {
482 syslog(LOG_WARNING, "Running pre-startup database upgrades.");
483 }
484 else {
485 return;
486 }
487
488 if ((oldver > 000) && (oldver < 591)) {
489 syslog(LOG_EMERG, "This database is too old to be upgraded. Citadel server will exit.");
490 exit(EXIT_FAILURE);
491 }
492 if ((oldver > 000) && (oldver < 913)) {
493 reindex_uids();
494 }
495 if ((oldver > 000) && (oldver < 659)) {
497 }
498 if (oldver < 735) {
500 }
501 if (oldver < 736) {
503 }
504 if (oldver < 790) {
506 }
507 if (oldver < 810) {
508 struct ctdlroom QRoom;
509 if (!CtdlGetRoom(&QRoom, SMTP_SPOOLOUT_ROOM)) {
510 QRoom.QRdefaultview = VIEW_QUEUE;
511 CtdlPutRoom(&QRoom);
512 }
513 }
514
515 if ((oldver > 000) && (oldver < 902)) {
517 }
518
519 CtdlSetConfigInt("MM_hosted_upgrade_level", REV_LEVEL);
520
521 // Negative values for maxsessions are not allowed.
522 if (CtdlGetConfigInt("c_maxsessions") < 0) {
523 CtdlSetConfigInt("c_maxsessions", 0);
524 }
525
526 // We need a system default message expiry policy, because this is
527 // the top level and there's no 'higher' policy to fall back on.
528 // By default, do not expire messages at all.
529 if (CtdlGetConfigInt("c_ep_mode") == 0) {
530 CtdlSetConfigInt("c_ep_mode", EXPIRE_MANUAL);
531 CtdlSetConfigInt("c_ep_value", 0);
532 }
533
534 // If this is the first run on an empty database, create a default administrator
535 if (oldver == 0) {
537 }
538}
539
540
541// Based on the server version number reported by the existing database,
542// run in-place data format upgrades until everything is up to date.
544
545 syslog(LOG_INFO, "Existing database version on disk is %d", oldver);
546
547 if (oldver < REV_LEVEL) {
548 syslog(LOG_WARNING, "Running post-startup database upgrades.");
549 }
550 else {
551 return;
552 }
553
554 if ((oldver > 000) && (oldver < 912)) {
556 }
557
558 if ((oldver > 000) && (oldver < 922)) {
560 }
561
562 if ((oldver > 000) && (oldver < 930)) {
564 }
565
566}
567
568
569// Initialization function, called from modules_init.c
571 if (!threading) {
573 }
574
575 /* return our module name for the log */
576 return "upgrade";
577}
#define ROOMNAMELEN
Definition: citadel.h:51
#define DEFAULT_ADMIN_PASSWORD
Definition: citadel.h:48
#define DEFAULT_ADMIN_USERNAME
Definition: citadel.h:47
#define REV_LEVEL
Definition: citadel.h:28
#define EXPIRE_MANUAL
Definition: citadel.h:63
#define USERNAME_SIZE
Definition: citadel.h:52
size_t assoc_file_name(char *buf, size_t n, struct ctdlroom *qrbuf, const char *prefix)
Definition: citadel_dirs.c:22
#define file_guesstimezone
Definition: citadel_dirs.h:42
#define file_arcq
Definition: citadel_dirs.h:34
#define ctdl_image_dir
Definition: citadel_dirs.h:17
#define ctdl_info_dir
Definition: citadel_dirs.h:18
char * CtdlGetConfigStr(char *key)
Definition: config.c:363
int CtdlGetConfigInt(char *key)
Definition: config.c:390
void CtdlSetConfigStr(char *key, char *value)
Definition: config.c:308
void CtdlSetConfigInt(char *key, int value)
Definition: config.c:335
#define CC
Definition: context.h:140
void CtdlPutUser(struct ctdluser *usbuf)
Definition: user_ops.c:107
int attach_extauth(struct ctdluser *who, StrBuf *claimed_id)
int CtdlGetRoom(struct ctdlroom *qrbuf, const char *room_name)
Definition: room_ops.c:309
int CtdlGetUserByNumber(struct ctdluser *usbuf, long number)
Definition: user_ops.c:398
int CtdlGetUserLock(struct ctdluser *usbuf, char *name)
Definition: user_ops.c:95
int threading
Definition: modules_init.c:24
int CtdlGetRoomLock(struct ctdlroom *qrbuf, const char *room_name)
Definition: room_ops.c:352
void CtdlPutRoom(struct ctdlroom *)
Definition: room_ops.c:388
void CtdlForEachRoom(ForEachRoomCallBack CB, void *in_data)
Definition: room_ops.c:542
void CtdlPutUserLock(struct ctdluser *usbuf)
Definition: user_ops.c:121
#define CTDLUID
Definition: ctdl_module.h:262
int CtdlGetUser(struct ctdluser *usbuf, char *name)
Definition: user_ops.c:64
void CtdlPutRoomLock(struct ctdlroom *qrbuf)
Definition: room_ops.c:400
int cdb_delete(int cdb, void *key, int keylen)
Definition: database.c:477
void rebuild_euid_index(void)
Definition: euidindex.c:158
void CtdlRebuildDirectoryIndex(void)
void CtdlSetEmailAddressesForUser(char *requested_user, char *new_emailaddrs)
void AdjRefCount(long msgnum, int incr)
Definition: msgbase.c:3430
int CtdlForEachMessage(int mode, long ref, char *search_string, char *content_type, struct CtdlMessage *compare, ForEachMsgCallback CallBack, void *userdata)
Definition: msgbase.c:621
long quickie_message(char *from, char *fromaddr, char *to, char *room, char *text, int format_type, char *subject)
Definition: msgbase.c:2906
@ MSGS_LAST
Definition: msgbase.h:10
void * malloc(unsigned)
void free(void *)
struct ctdlroom qrbuf
Definition: serv_migrate.c:497
struct ctdluser usbuf
Definition: serv_migrate.c:496
void mifm_backend(char *username, void *data)
Definition: serv_upgrade.c:437
int oldver
Definition: serv_upgrade.c:48
int ProcessOldStyleAdjRefCountQueue(void)
Definition: serv_upgrade.c:391
void mifm_found_config(long msgnum, void *userdata)
Definition: serv_upgrade.c:428
void miafvtur_backend(char *username, void *data)
Definition: serv_upgrade.c:361
void remove_thread_users(void)
Definition: serv_upgrade.c:107
char * ctdl_module_init_upgrade(void)
Definition: serv_upgrade.c:570
void migrate_inbox_filter_msgnums(void)
Definition: serv_upgrade.c:455
void pre_startup_upgrades(void)
Definition: serv_upgrade.c:475
void iorarf_backend(struct ctdlroom *qrbuf, void *data)
Definition: serv_upgrade.c:252
void iorarf_oneroom(char *roomname, char *infofile, char *picfile)
Definition: serv_upgrade.c:157
void ingest_old_roominfo_and_roompic_files(void)
Definition: serv_upgrade.c:294
void create_default_admin_account(void)
Definition: serv_upgrade.c:461
void move_inet_addrs_from_vcards_to_user_records(void)
Definition: serv_upgrade.c:421
void post_startup_upgrades(void)
Definition: serv_upgrade.c:543
void update_config(void)
Definition: serv_upgrade.c:313
void fix_sys_user_name(void)
Definition: serv_upgrade.c:51
void guess_time_zone(void)
Definition: serv_upgrade.c:139
void reindex_uids(void)
Definition: serv_upgrade.c:98
void reindex_uids_backend(char *username, void *data)
Definition: serv_upgrade.c:76
struct vCard * vcard_get_user(struct ctdluser *u)
Definition: serv_vcard.c:477
void extract_inet_email_addrs(char *emailaddrbuf, size_t emailaddrbuf_len, char *secemailaddrbuf, size_t secemailaddrbuf_len, struct vCard *v, int local_addrs_only)
Definition: serv_vcard.c:82
#define FMT_RFC822
Definition: server.h:178
@ CDB_USERS
Definition: server.h:186
Definition: server.h:279
int arcq_delta
Definition: server.h:281
long arcq_msgnum
Definition: server.h:280
long msgnum_info
Definition: citadel.h:101
char QRname[128]
Definition: citadel.h:94
long msgnum_pic
Definition: citadel.h:109
int QRdefaultview
Definition: citadel.h:108
cit_uint8_t axlevel
Definition: citadel.h:76
char fullname[64]
Definition: citadel.h:80
long msgnum_inboxrules
Definition: citadel.h:84
uid_t uid
Definition: citadel.h:71
long usernum
Definition: citadel.h:77
char password[32]
Definition: citadel.h:72
char pic[PATH_MAX]
Definition: serv_upgrade.c:246
char name[ROOMNAMELEN]
Definition: serv_upgrade.c:244
char info[PATH_MAX]
Definition: serv_upgrade.c:245
struct iorarf_list * next
Definition: serv_upgrade.c:243
#define USERCONFIGROOM
Definition: sysconfig.h:64
#define SMTP_SPOOLOUT_ROOM
Definition: sysconfig.h:73
#define SIZ
Definition: sysconfig.h:33
#define SYSCONFIGROOM
Definition: sysconfig.h:72
void ForEachUser(void(*CallBack)(char *, void *out_data), void *in_data)
Definition: user_ops.c:1077
void rebuild_usersbynumber(void)
Definition: user_ops.c:427
int create_user(char *username, int become_user, uid_t uid)
Definition: user_ops.c:949
void makeuserkey(char *key, const char *username)
Definition: user_ops.c:31
@ CREATE_USER_DO_NOT_BECOME_USER
Definition: user_ops.h:31
#define NATIVE_AUTH_UID
Definition: user_ops.h:34