mlock error: not setgid mail

Vonleigh Simmons nospam at illusionart.com
Wed Dec 8 12:10:48 PST 2004


> In the last episode (Dec 08), Vonleigh Simmons said:
>>> In the last episode (Dec 07), Vonleigh Simmons said:
>>>> 	After updating to 5.3 I'm running into the following, I'm
>>>> 	getting the following error in my mail log over and over:
>>>>
>>>> usr/local/libexec/mlock[755]: (64) not setgid mail
>>
>> 	I rebuilt imap-uw with -DWITH_SSL_AND_PLAINTEXT, so I don't think
>> that's it. Here are my permissions for mlock, they match yours:
>>
>> -rwx--s--x  1 root  mail  5808 Dec  6 21:48 /usr/local/libexec/mlock
>>
>> 	Anyone have any other ideas?
>
> The code that does the check is this:
>
>   struct group *grp = getgrnam ("mail");
>   if (!grp || (grp->gr_gid != getegid ())) die ("not setgid 
> mail",EX_USAGE);
>
> The only way I can see that failing is if getgrnam() failed to look up
> the "mail" group, or if the gid of mlock doesn't match the gid returned
> by getgrnam().  Is it possible you have two "mail" groups?  Compare the
> output of "ls -ln" and your /etc/groups file.  Splitting that if() into
> two parts with separate error messages will also tell you which test is
> failing.

	I do have to mail groups, but they're named differently:

# grep mail /etc/group
mail:*:6:clamav
mailnull:*:26:

	I ran chkgrp just in case and it runs silently, also checked to see if 
maybe there's two groups with the ID 6, but that isn't the case either. 
Does one have to 'reload' the groups like the master.password file?

# ls -ln /usr/local/libexec/mlock
-rwx--s--x  1 0  6  5808 Dec  6 21:48 /usr/local/libexec/mlock


Vonleigh Simmons
<http://illusionart.com/>



More information about the freebsd-questions mailing list