Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alan@ajf-rh ~$ g++ -laugeas aug.cpp
- /tmp/ccKAoo7L.o: In function `main':
- aug.cpp:(.text+0x1f): undefined reference to `aug_init(char const*, char const*, unsigned int)'
- aug.cpp:(.text+0x39): undefined reference to `aug_set(augeas*, char const*, char const*)'
- aug.cpp:(.text+0x45): undefined reference to `aug_close(augeas*)'
- collect2: ld returned 1 exit status
- alan@ajf-rh ~$ grep aug_init /usr/include/augeas.h
- /* Function: aug_init
- augeas *aug_init(const char *root, const char *loadpath, unsigned int flags);
- alan@ajf-rh ~$ objdump -t /usr/lib64/libaugeas.so.0.13.1 |grep aug_init
- 00000000000061e0 g F .text 000000000000067f aug_init
- alan@ajf-rh ~$ ll /usr/lib64/libaugeas.*
- -rw-r--r-- 1 root root 1530886 May 23 19:14 /usr/lib64/libaugeas.a
- -rwxr-xr-x 1 root root 957 May 23 19:14 /usr/lib64/libaugeas.la
- lrwxrwxrwx 1 root root 19 May 23 19:14 /usr/lib64/libaugeas.so -> libaugeas.so.0.13.1
- lrwxrwxrwx 1 root root 19 May 23 19:14 /usr/lib64/libaugeas.so.0 -> libaugeas.so.0.13.1
- -rwxr-xr-x 1 root root 915492 May 23 19:14 /usr/lib64/libaugeas.so.0.13.1
- alan@ajf-rh ~$ pkg-config --cflags --libs augeas
- -laugeas
- alan@ajf-rh ~$ cat aug.cpp
- #include <augeas.h>
- int main(int argc, char *argv[])
- {
- augeas *aug = aug_init("/", "/usr/share/augeas/lenses/", 0);
- aug_set(aug, "/files/etc/ssh/sshd_config/PermitRootLogin", "no");
- aug_close(aug);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement