Bug 6426 - Check for user's existence and valid uid/gid
Summary: Check for user's existence and valid uid/gid
Status: NEW
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: unspecified
Hardware: Other HP-UX
: P3 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 10202
  Show dependency treegraph
 
Reported: 2009-06-01 03:22 UTC by Zhou Weikuan
Modified: 2014-07-24 08:04 UTC (History)
2 users (show)

See Also:


Attachments
check negative uid/gid (1.72 KB, patch)
2009-06-01 03:53 UTC, Zhou Weikuan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zhou Weikuan 2009-06-01 03:22:36 UTC
HPUX's user in /etc/passwd may have a negative uid/gid, this may cause trouble if we set it as guest account. It would be better to check it in testparm.
Comment 1 Zhou Weikuan 2009-06-01 03:53:59 UTC
Created attachment 4226 [details]
check negative uid/gid

This patch checks negative uid/gid on hpux. There is similar workaround on the internet, but this patch makes it explict.

Checked the log, no one did this patch before.
Comment 2 Jeremy Allison 2009-06-01 12:27:58 UTC
Ok, is the underlying issue that HPUX uses a signed integer for uid_t/gid_t ? If so, we really need to change this to a feature test instead of using #ifdef HPUX. That way it'll cover all platforms with this problem. If you can confirm I'll adapt the patch and add a configure test, thanks.
Jeremy.
Comment 3 Zhou Weikuan 2009-06-02 01:20:32 UTC
For HPUX 11.23 (ia4), about line 220 of <sys/types.h>:
    #  ifndef _GID_T
    #    define _GID_T
         typedef int32_t gid_t;             /* For group IDs */
    #  endif /* _GID_T */

    #  ifndef _UID_T
    #    define _UID_T
         typedef int32_t uid_t;             /* For user IDs */
    #  endif /* _UID_T */

so it seems to use a signed integer for uid_t/gid_t.

Thanks,