@@ -65,7 +65,7 @@ directory is a mount trap only if the filesystem is mounted *direct*
65
65
and the root is empty.
66
66
67
67
Directories created in the root directory are mount traps only if the
68
- filesystem is mounted *indirect* and they are empty.
68
+ filesystem is mounted *indirect* and they are empty.
69
69
70
70
Directories further down the tree depend on the *maxproto* mount
71
71
option and particularly whether it is less than five or not.
@@ -352,7 +352,7 @@ Communicating with autofs: root directory ioctls
352
352
------------------------------------------------
353
353
354
354
The root directory of an autofs filesystem will respond to a number of
355
- ioctls. The process issuing the ioctl must have the CAP_SYS_ADMIN
355
+ ioctls. The process issuing the ioctl must have the CAP_SYS_ADMIN
356
356
capability, or must be the automount daemon.
357
357
358
358
The available ioctl commands are:
@@ -425,8 +425,20 @@ Each ioctl is passed a pointer to an `autofs_dev_ioctl` structure:
425
425
* including this struct */
426
426
__s32 ioctlfd; /* automount command fd */
427
427
428
- __u32 arg1; /* Command parameters */
429
- __u32 arg2;
428
+ /* Command parameters */
429
+ union {
430
+ struct args_protover protover;
431
+ struct args_protosubver protosubver;
432
+ struct args_openmount openmount;
433
+ struct args_ready ready;
434
+ struct args_fail fail;
435
+ struct args_setpipefd setpipefd;
436
+ struct args_timeout timeout;
437
+ struct args_requester requester;
438
+ struct args_expire expire;
439
+ struct args_askumount askumount;
440
+ struct args_ismountpoint ismountpoint;
441
+ };
430
442
431
443
char path[0];
432
444
};
@@ -446,25 +458,22 @@ Commands are:
446
458
set version numbers.
447
459
- **AUTOFS_DEV_IOCTL_OPENMOUNT_CMD**: return an open file descriptor
448
460
on the root of an autofs filesystem. The filesystem is identified
449
- by name and device number, which is stored in `arg1`. Device
450
- numbers for existing filesystems can be found in
461
+ by name and device number, which is stored in `openmount.devid`.
462
+ Device numbers for existing filesystems can be found in
451
463
`/proc/self/mountinfo`.
452
464
- **AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD**: same as `close(ioctlfd)`.
453
465
- **AUTOFS_DEV_IOCTL_SETPIPEFD_CMD**: if the filesystem is in
454
466
catatonic mode, this can provide the write end of a new pipe
455
- in `arg1 ` to re-establish communication with a daemon. The
456
- process group of the calling process is used to identify the
467
+ in `setpipefd.pipefd ` to re-establish communication with a daemon.
468
+ The process group of the calling process is used to identify the
457
469
daemon.
458
470
- **AUTOFS_DEV_IOCTL_REQUESTER_CMD**: `path` should be a
459
471
name within the filesystem that has been auto-mounted on.
460
- arg1 is the dev number of the underlying autofs. On successful
461
- return, `arg1` and `arg2` will be the UID and GID of the process
462
- which triggered that mount.
463
-
472
+ On successful return, `requester.uid` and `requester.gid` will be
473
+ the UID and GID of the process which triggered that mount.
464
474
- **AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD**: Check if path is a
465
475
mountpoint of a particular type - see separate documentation for
466
476
details.
467
-
468
477
- **AUTOFS_DEV_IOCTL_PROTOVER_CMD**:
469
478
- **AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD**:
470
479
- **AUTOFS_DEV_IOCTL_READY_CMD**:
@@ -474,7 +483,7 @@ Commands are:
474
483
- **AUTOFS_DEV_IOCTL_EXPIRE_CMD**:
475
484
- **AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD**: These all have the same
476
485
function as the similarly named **AUTOFS_IOC** ioctls, except
477
- that **FAIL** can be given an explicit error number in `arg1 `
486
+ that **FAIL** can be given an explicit error number in `fail.status `
478
487
instead of assuming `ENOENT`, and this **EXPIRE** command
479
488
corresponds to **AUTOFS_IOC_EXPIRE_MULTI**.
480
489
@@ -512,7 +521,7 @@ always be mounted "shared". e.g.
512
521
513
522
> `mount --make-shared /autofs/mount/point`
514
523
515
- The automount daemon is only able to mange a single mount location for
524
+ The automount daemon is only able to manage a single mount location for
516
525
an autofs filesystem and if mounts on that are not 'shared', other
517
526
locations will not behave as expected. In particular access to those
518
527
other locations will likely result in the `ELOOP` error
0 commit comments