| 3293 | } |
| 3294 | |
| 3295 | int |
| 3296 | kern_futimens(struct thread *td, int fd, struct timespec *tptr, |
| 3297 | enum uio_seg tptrseg) |
| 3298 | { |
| 3299 | struct timespec ts[2]; |
| 3300 | struct file *fp; |
| 3301 | int error, flags; |
| 3302 | |
| 3303 | AUDIT_ARG_FD(fd); |
| 3304 | error = getutimens(tptr, tptrseg, ts, &flags); |
| 3305 | if (error != 0) |
| 3306 | return (error); |
| 3307 | if (flags & UTIMENS_EXIT) |
| 3308 | return (0); |
| 3309 | error = getvnode(td, fd, &cap_futimes_rights, &fp); |
| 3310 | if (error != 0) |
| 3311 | return (error); |
| 3312 | #ifdef AUDIT |
| 3313 | vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); |
| 3314 | AUDIT_ARG_VNODE1(fp->f_vnode); |
| 3315 | VOP_UNLOCK(fp->f_vnode); |
| 3316 | #endif |
| 3317 | error = setutimes(td, fp->f_vnode, ts, 2, flags & UTIMENS_NULL); |
| 3318 | fdrop(fp, td); |
| 3319 | return (error); |
| 3320 | } |
| 3321 | |
| 3322 | int |
| 3323 | sys_utimensat(struct thread *td, struct utimensat_args *uap) |
no test coverage detected