2944 |
#endif |
#endif |
2945 |
#ifdef TARGET_NR_getgroups32 |
#ifdef TARGET_NR_getgroups32 |
2946 |
case TARGET_NR_getgroups32: |
case TARGET_NR_getgroups32: |
2947 |
goto unimplemented; |
{ |
2948 |
|
int gidsetsize = arg1; |
2949 |
|
uint32_t *target_grouplist = (void *)arg2; |
2950 |
|
gid_t *grouplist; |
2951 |
|
int i; |
2952 |
|
|
2953 |
|
grouplist = alloca(gidsetsize * sizeof(gid_t)); |
2954 |
|
ret = get_errno(getgroups(gidsetsize, grouplist)); |
2955 |
|
if (!is_error(ret)) { |
2956 |
|
for(i = 0;i < gidsetsize; i++) |
2957 |
|
put_user(grouplist[i], &target_grouplist[i]); |
2958 |
|
} |
2959 |
|
} |
2960 |
|
break; |
2961 |
#endif |
#endif |
2962 |
#ifdef TARGET_NR_setgroups32 |
#ifdef TARGET_NR_setgroups32 |
2963 |
case TARGET_NR_setgroups32: |
case TARGET_NR_setgroups32: |
2964 |
goto unimplemented; |
{ |
2965 |
|
int gidsetsize = arg1; |
2966 |
|
uint32_t *target_grouplist = (void *)arg2; |
2967 |
|
gid_t *grouplist; |
2968 |
|
int i; |
2969 |
|
|
2970 |
|
grouplist = alloca(gidsetsize * sizeof(gid_t)); |
2971 |
|
for(i = 0;i < gidsetsize; i++) |
2972 |
|
get_user(grouplist[i], &target_grouplist[i]); |
2973 |
|
ret = get_errno(setgroups(gidsetsize, grouplist)); |
2974 |
|
} |
2975 |
|
break; |
2976 |
#endif |
#endif |
2977 |
#ifdef TARGET_NR_fchown32 |
#ifdef TARGET_NR_fchown32 |
2978 |
case TARGET_NR_fchown32: |
case TARGET_NR_fchown32: |