summaryrefslogtreecommitdiff
path: root/source3/smbd/password.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-07-27 18:50:45 +0000
committerJeremy Allison <jra@samba.org>1998-07-27 18:50:45 +0000
commit1aa138922e5c0e4925ff5cbfcdb4e7cad367b31b (patch)
tree97f6d24aee7bc1b53bb7d3c7d1ad9ce38f88bbee /source3/smbd/password.c
parent85474e07804f815a74de399654f28a80722449ab (diff)
downloadsamba-1aa138922e5c0e4925ff5cbfcdb4e7cad367b31b.tar.gz
samba-1aa138922e5c0e4925ff5cbfcdb4e7cad367b31b.tar.bz2
samba-1aa138922e5c0e4925ff5cbfcdb4e7cad367b31b.zip
chgpasswd.c: Fixed up debug calls to stop crashes if ptsname failed.
local.h: Kept FSTYPE_STRING as Samba for now. nmbd_browsesync.c: Added bugfix from Matt Chapman mattyc@cyberdude.com - lmb_browserlist is now a struct ubi_dlList not a struct browse_cache_record *. server.c: smb.h: uid.c: password.c: Removed attrs code - it is not used anywhere. Jeremy (This used to be commit ef1af7fe6d5c58ae57b8e4efff0729e1a315da43)
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r--source3/smbd/password.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index e160580e5f..711729f86d 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -134,17 +134,15 @@ void invalidate_vuid(uint16 vuid)
vuser->n_sids = 0;
- /* same number of igroups as groups as attrs */
+ /* same number of igroups as groups */
vuser->n_groups = 0;
if (vuser->groups && (vuser->groups != (gid_t *)vuser->igroups))
free(vuser->groups);
if (vuser->igroups) free(vuser->igroups);
- if (vuser->attrs ) free(vuser->attrs);
if (vuser->sids ) free(vuser->sids);
- vuser->attrs = NULL;
vuser->sids = NULL;
vuser->igroups = NULL;
vuser->groups = NULL;
@@ -167,8 +165,7 @@ char *validated_username(uint16 vuid)
Setup the groups a user belongs to.
****************************************************************************/
int setup_groups(char *user, int uid, int gid, int *p_ngroups,
- int **p_igroups, gid_t **p_groups,
- int **p_attrs)
+ int **p_igroups, gid_t **p_groups)
{
if (-1 == initgroups(user,gid))
{
@@ -183,25 +180,19 @@ int setup_groups(char *user, int uid, int gid, int *p_ngroups,
{
int i,ngroups;
int *igroups;
- int *attrs;
gid_t grp = 0;
ngroups = getgroups(0,&grp);
if (ngroups <= 0)
ngroups = 32;
igroups = (int *)malloc(sizeof(int)*ngroups);
- attrs = (int *)malloc(sizeof(int)*ngroups);
for (i=0;i<ngroups;i++)
- {
- attrs [i] = 0x7; /* XXXX don't know what NT user attributes are yet! */
igroups[i] = 0x42424242;
- }
ngroups = getgroups(ngroups,(gid_t *)igroups);
if (igroups[0] == 0x42424242)
ngroups = 0;
*p_ngroups = ngroups;
- *p_attrs = attrs;
/* The following bit of code is very strange. It is due to the
fact that some OSes use int* and some use gid_t* for
@@ -309,15 +300,13 @@ uint16 register_vuid(int uid,int gid, char *unix_name, char *requested_name, BOO
vuser->n_groups = 0;
vuser->groups = NULL;
vuser->igroups = NULL;
- vuser->attrs = NULL;
/* Find all the groups this uid is in and store them.
Used by become_user() */
setup_groups(unix_name,uid,gid,
&vuser->n_groups,
&vuser->igroups,
- &vuser->groups,
- &vuser->attrs);
+ &vuser->groups);
DEBUG(3,("uid %d registered to name %s\n",uid,unix_name));