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.
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.
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.
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.