id
This command prints the user identity. This includes the user id (uid), group id (gid), effective user id (euid), and effective group id (egid).
This command returns 0 on success and non-zero if an error is encountered.
Remember there is only one POSIX process in a single processor RTEMS application. Each thread may have its own user identity and that identity is used by the filesystem to enforce permissions.
The first example of the id
command is from a session logged
in as the normal user rtems
:
SHLL [/] # id uid=1(rtems),gid=1(rtems),euid=1(rtems),egid=1(rtems)
The second example of the id
command is from a session logged
in as the root
user:
SHLL [/] # id uid=0(root),gid=0(root),euid=0(root),egid=0(root)
This command is included in the default shell command set.
When building a custom command set, define
CONFIGURE_SHELL_COMMAND_ID
to have this
command included.
This command can be excluded from the shell command set by
defining CONFIGURE_SHELL_NO_COMMAND_ID
when all
shell commands have been configured.
The id
is implemented by a C language function
which has the following prototype:
int rtems_shell_rtems_main_id( int argc, char **argv );
The configuration structure for the id
has the
following prototype:
extern rtems_shell_cmd_t rtems_shell_ID_Command;
Copyright © 1988-2008 OAR Corporation