| 3261 | } |
| 3262 | |
| 3263 | int |
| 3264 | kern_futimes(struct thread *td, int fd, struct timeval *tptr, |
| 3265 | enum uio_seg tptrseg) |
| 3266 | { |
| 3267 | struct timespec ts[2]; |
| 3268 | struct file *fp; |
| 3269 | int error; |
| 3270 | |
| 3271 | AUDIT_ARG_FD(fd); |
| 3272 | error = getutimes(tptr, tptrseg, ts); |
| 3273 | if (error != 0) |
| 3274 | return (error); |
| 3275 | error = getvnode(td, fd, &cap_futimes_rights, &fp); |
| 3276 | if (error != 0) |
| 3277 | return (error); |
| 3278 | #ifdef AUDIT |
| 3279 | vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); |
| 3280 | AUDIT_ARG_VNODE1(fp->f_vnode); |
| 3281 | VOP_UNLOCK(fp->f_vnode); |
| 3282 | #endif |
| 3283 | error = setutimes(td, fp->f_vnode, ts, 2, tptr == NULL); |
| 3284 | fdrop(fp, td); |
| 3285 | return (error); |
| 3286 | } |
| 3287 | |
| 3288 | int |
| 3289 | sys_futimens(struct thread *td, struct futimens_args *uap) |
no test coverage detected