Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use absolute path for ldconfig #286

Merged
merged 1 commit into from
Oct 8, 2019
Merged

use absolute path for ldconfig #286

merged 1 commit into from
Oct 8, 2019

Conversation

fdellwing
Copy link
Contributor

If you have no PATH set while running your script (in our case, because it is called by OpenVPN), the import of iptc will fail.

Traceback (most recent call last):
  File "/etc/openvpn/scripts/checklogin.py", line 14, in <module>
    from mb_helpers import add_syslog, get_user_passwd, delete_s_auth_forward
  File "/etc/openvpn/scripts/mb_helpers.py", line 8, in <module>
    import iptc
  File "/usr/local/lib/python3.7/site-packages/iptc/__init__.py", line 10, in <module>
    from iptc.ip4tc import (is_table_available, Table, Chain, Rule, Match, Target, Policy, IPTCError)
  File "/usr/local/lib/python3.7/site-packages/iptc/ip4tc.py", line 13, in <module>
    from .xtables import (XT_INV_PROTO, NFPROTO_IPV4, XTablesError, xtables,
  File "/usr/local/lib/python3.7/site-packages/iptc/xtables.py", line 812, in <module>
    stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True
  File "/usr/local/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/local/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ldconfig': 'ldconfig'

I checked Debian, BSD and Arch manpages and ldconfig is in all cases under sbin.

@ldx ldx merged commit a26a630 into ldx:master Oct 8, 2019
@ldx
Copy link
Owner

ldx commented Oct 8, 2019

Thanks!

@fdellwing fdellwing deleted the patch-1 branch October 9, 2019 05:42
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.

2 participants