UIDs of 32 bit size are not available on linux 2.2, and SMB_IOC_GETMOUNTUID32 being undefined is a certain sign for this. Thus using 32 bit UIDs can be conditionalized by checking for this preprocessor symbol. --- samba-3.0.14a/source/client/smbumount.c.old 2005-02-25 18:59:23.000000000 +0100 +++ samba-3.0.14a/source/client/smbumount.c 2005-05-08 17:03:15.000000000 +0200 @@ -39,7 +39,10 @@ /* we set O_NOFOLLOW to prevent users playing games with symlinks to umount filesystems they don't own */ int fid = open(mount_point, O_RDONLY|O_NOFOLLOW, 0); - __kernel_uid32_t mount_uid; +#ifdef SMB_IOC_GETMOUNTUID32 + __kernel_uid32_t mount_uid32; +#endif + uid_t mount_uid; if (fid == -1) { fprintf(stderr, "Could not open %s: %s\n", @@ -47,7 +50,12 @@ return -1; } - if (ioctl(fid, SMB_IOC_GETMOUNTUID32, &mount_uid) != 0) { +#ifdef SMB_IOC_GETMOUNTUID32 + if (!ioctl(fid, SMB_IOC_GETMOUNTUID32, &mount_uid32)) + mount_uid = mount_uid32; + else +#endif + { __kernel_uid_t mount_uid16; if (ioctl(fid, SMB_IOC_GETMOUNTUID, &mount_uid16) != 0) { fprintf(stderr, "%s probably not smb-filesystem\n",