Documentation

SystemDceSecurityProvider
in package
implements DceSecurityProviderInterface

SystemDceSecurityProvider retrieves the user or group identifiers from the system

Interfaces, Classes, Traits and Enums

DceSecurityProviderInterface
A DCE provider provides access to local domain identifiers for version 2, DCE Security, UUIDs

Table of Contents

getGid()  : Integer
Returns a group identifier for the system
getUid()  : Integer
Returns a user identifier for the system
getOs()  : string
Returns the PHP_OS string
getSystemGid()  : string
Returns the GID from the system
getSystemUid()  : string
Returns the UID from the system
getWindowsGid()  : string
Returns a group identifier for a user on a Windows system
getWindowsUid()  : string
Returns the user identifier for a user on a Windows system
hasShellExec()  : bool
Returns true if shell_exec() is available for use

Methods

getWindowsGid()

Returns a group identifier for a user on a Windows system

private getWindowsGid() : string

Since Windows does not have the same concept as an effective POSIX GID for the running script, we will get the local group memberships for the user running the script. Then, we will get the SID (security identifier) for the first group that appears in that list. Finally, we will return the RID (relative identifier) for the group and use that as the GID.

Tags
link

List of user groups command line

Return values
string

getWindowsUid()

Returns the user identifier for a user on a Windows system

private getWindowsUid() : string

Windows does not have the same concept as an effective POSIX UID for the running script. Instead, each user is uniquely identified by an SID (security identifier). The SID includes three 32-bit unsigned integers that make up a unique domain identifier, followed by an RID (relative identifier) that we will use as the UID. The primary caveat is that this UID may not be unique to the system, since it is, instead, unique to the domain.

Tags
link

What Is an SID Number?

link

Well-known SID Structures

link

Well-known security identifiers in Windows operating systems

link

Get SID of user

Return values
string

hasShellExec()

Returns true if shell_exec() is available for use

private hasShellExec() : bool
Return values
bool

Search results