__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# Copyright (C) 2023 Canonical Ltd. # Author: Benjamin Drung <[email protected]> # SPDX-License-Identifier: GPL-2.0-or-later """Functions around users and groups.""" import dataclasses import os @dataclasses.dataclass() class UserGroupID: """Pair of user and group ID.""" uid: int gid: int def is_root(self) -> bool: """Check if the user or group ID is root.""" return self.uid == 0 or self.gid == 0 @classmethod def from_systemd_coredump(cls, coredump): """Extract user and group from systemd-coredump dictionary.""" uid = coredump.get("COREDUMP_UID") assert isinstance(uid, int) gid = coredump.get("COREDUMP_GID") assert isinstance(gid, int) return cls(uid, gid) def get_process_user_and_group() -> UserGroupID: """Return the current process’s real user and group.""" return UserGroupID(os.getuid(), os.getgid())
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| crashdb_impl | Folder | 0755 |
|
|
| packaging_impl | Folder | 0755 |
|
|
| REThread.py | File | 2.3 KB | 0644 |
|
| __init__.py | File | 657 B | 0644 |
|
| crashdb.py | File | 34.17 KB | 0644 |
|
| fileutils.py | File | 22.47 KB | 0644 |
|
| hookutils.py | File | 36.96 KB | 0644 |
|
| logging.py | File | 1.41 KB | 0644 |
|
| packaging.py | File | 13.75 KB | 0644 |
|
| py.typed | File | 0 B | 0644 |
|
| report.py | File | 74.3 KB | 0644 |
|
| sandboxutils.py | File | 12.75 KB | 0644 |
|
| ui.py | File | 78.48 KB | 0644 |
|
| user_group.py | File | 933 B | 0644 |
|