Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
875d00a3
Commit
875d00a3
authored
Jun 18, 1994
by
Per Cederqvist
Browse files
(create_person): Set change_name according to param.default_change_name.
Check param.anyone_can_create_new_persons and create_pers.
parent
7d83e3f0
Changes
1
Show whitespace changes
Inline
Side-by-side
src/server/person.c
View file @
875d00a3
/*
* $Id: person.c,v 0.2
8
1994/0
4/05 08:02
:5
6
ceder Exp $
* $Id: person.c,v 0.2
9
1994/0
6/18 20:35
:5
5
ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -28,7 +28,7 @@
* All atomic calls that deals with persons.
*/
static
char
*
rcsid
=
"$Id: person.c,v 0.2
8
1994/0
4/05 08:02
:5
6
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: person.c,v 0.2
9
1994/0
6/18 20:35
:5
5
ceder Exp $"
;
#include "rcs.h"
USE
(
rcsid
);
...
...
@@ -489,9 +489,10 @@ unmark_text(Text_no text_no)
/*
* Create a new person.
*
* If
CREATE_PERSON_BEFORE_LOGIN (#define'd in config.h)
is true
* If
parameter ``Anyone can create new persons''
is true
* anyone can create themself. Otherwise you must be logged in to
* create a new person.
* create a new person, and you must have the ``create_pers'' bit
* set, or ``Anyone can create_new_persons'' must be set.
*
* If you are not logged in an auto-login as the created person is
* performed. (This is so that it is impossible to create a million
...
...
@@ -501,8 +502,9 @@ unmark_text(Text_no text_no)
* If you are logged in you will be supervisor and creator of the new
* person, otherwise the new person will be supervisor and creator.
*
* The new person will be rd_prot, but not secret. His privileges will
* be as defined in DEFAULT_PRIV_BITS in kom-types.c.
* The new person will be rd_prot, but not secret. He will have no
* privileges, except maybe change_name (if ``Default change name
* capability'' is true).
*
* This function returns the Pers_no of the new person, or 0 if an error
* occured. (0 is an illegal Pers_no).
...
...
@@ -516,11 +518,23 @@ create_person (String name,
Person
*
pers_p
;
if
(
ACTPERS
==
0
)
{
if
(
!
param
.
create_person_before_login
&&
ACTPERS
==
0
)
{
kom_errno
=
KOM_LOGIN
;
return
0
;
}
}
else
{
if
(
param
.
anyone_can_create_new_persons
==
FALSE
&&
!
ENA
(
create_pers
,
0
)
)
{
kom_errno
=
KOM_PERM
;
return
0
;
}
}
#if 0
if ( !logins_allowed && !ACTPERS ) /* A new user can't create himself */
...
...
@@ -593,6 +607,8 @@ create_person (String name,
if
(
do_set_passwd
(
pers_p
->
pwd
,
passwd
)
!=
OK
)
restart_kom
(
"create_person(): can't set passwd
\n
"
);
pers_p
->
privileges
.
change_name
=
param
.
default_change_name
;
mark_person_as_changed
(
new_user
);
do_add_member
(
new_user
,
mailbox
,
new_user
,
pers_p
,
UCHAR_MAX
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment