summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-07-29 05:05:36 +0000
committerAndrew Tridgell <tridge@samba.org>1998-07-29 05:05:36 +0000
commitfb08c34cf3950f994701a9c98c89670f6346f7ab (patch)
treed24bacbacb7c84d89c52c2e7742a4fe4bea537b2 /source3/smbd/server.c
parent73dc9870af658dfe467e33ecefe2d740a0d0dbb0 (diff)
downloadsamba-fb08c34cf3950f994701a9c98c89670f6346f7ab.tar.gz
samba-fb08c34cf3950f994701a9c98c89670f6346f7ab.tar.bz2
samba-fb08c34cf3950f994701a9c98c89670f6346f7ab.zip
get rid of the runtime test for broken getgroups() and add a compile
time test instead. This also allows us to get rid of the igroups element of a couple of structures. (This used to be commit 8b25fe734166b76ceebf8d9543c706ebe0fddc96)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 3469e45732..8eee0209b6 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -206,7 +206,7 @@ int dos_mode(int cnum,char *path,struct stat *sbuf)
((sbuf->st_mode & S_IWUSR) && current_user.uid==sbuf->st_uid) ||
((sbuf->st_mode & S_IWGRP) &&
in_group(sbuf->st_gid,current_user.gid,
- current_user.ngroups,current_user.igroups))))
+ current_user.ngroups,current_user.groups))))
result |= aRONLY;
} else {
if ((sbuf->st_mode & S_IWUSR) == 0)
@@ -356,7 +356,7 @@ int file_utime(int cnum, char *fname, struct utimbuf *times)
((sb.st_mode & S_IWUSR) && current_user.uid==sb.st_uid) ||
((sb.st_mode & S_IWGRP) &&
in_group(sb.st_gid,current_user.gid,
- current_user.ngroups,current_user.igroups)))) {
+ current_user.ngroups,current_user.groups)))) {
/* We are allowed to become root and change the filetime. */
become_root(False);
ret = sys_utime(fname, times);
@@ -3567,14 +3567,13 @@ int make_connection(char *service,char *user,char *password, int pwlen, char *de
/* groups stuff added by ih */
pcon->ngroups = 0;
- pcon->igroups = NULL;
pcon->groups = NULL;
if (!IS_IPC(cnum))
{
/* Find all the groups this uid is in and store them. Used by become_user() */
setup_groups(pcon->user,pcon->uid,pcon->gid,
- &pcon->ngroups,&pcon->igroups,&pcon->groups);
+ &pcon->ngroups,&pcon->groups);
/* check number of connections */
if (!claim_connection(cnum,
@@ -4267,11 +4266,8 @@ void close_cnum(int cnum, uint16 vuid)
num_connections_open--;
if (Connections[cnum].ngroups && Connections[cnum].groups)
{
- if (Connections[cnum].igroups != (int *)Connections[cnum].groups)
- free(Connections[cnum].groups);
- free(Connections[cnum].igroups);
+ free(Connections[cnum].groups);
Connections[cnum].groups = NULL;
- Connections[cnum].igroups = NULL;
Connections[cnum].ngroups = 0;
}