Skip to content

Hua work setuid#4

Merged
zaihuaji merged 8 commits into
mainfrom
hua-work-setuid
May 12, 2026
Merged

Hua work setuid#4
zaihuaji merged 8 commits into
mainfrom
hua-work-setuid

Conversation

@zaihuaji
Copy link
Copy Markdown
Collaborator

No description provided.

zaihuaji and others added 8 commits May 11, 2026 16:48
- add install.py (pywrapper-install): automates gcc compile, chmod setuid,
  symlink creation and setuid_ connector locking (replaces manual steps)
- pywrapper.c: replace __FILE__ path with /proc/self/exe for runtime correctness;
  add execv error handling; use snprintf/strncpy for buffer safety; adopt
  setuid_<prog> naming convention with dsarch.py fallback for back compat;
  update setup instructions and convention notes in header comments
- pgstart.py: fix PGLOG['USER'] KeyError (use GDEXUSER); replace hardcoded 'zji'
  with ruser==euser; replace os.system with subprocess.run/Popen; add subprocess import
- pyproject.toml: bump to 1.0.4; register pywrapper-install console script

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Display usage via 'more' when pywrapper-install is run with no arguments.
Include install.usg in package-data so it is bundled with the distribution.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consistent with the setuid_ naming convention for connector scripts.
pip install now places setuid_pywrapper in bin/ instead of pywrapper.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- install.usg: add dependency requirement section (rda_python_setuid must be
  declared in dependencies and setuid_ entry point must be registered)
- README.md: expand from one line to full user guide covering overview, dependency
  requirement, environment setup (venv and conda), installation sequence,
  and runtime flow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
--simple creates PROGRAM -> setuid_PROGRAM symlink directly, skipping the
setuid/pywrapper mechanism entirely.  The program runs as the current user.
--user is not required with --simple.  Useful for users who do not need or
cannot set up the setuid wrapper.  Update install.usg and README accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zaihuaji zaihuaji merged commit 8560bd1 into main May 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant