Exploit databaseDownload repository ZIP
GH-ea821316336f01071e5d83d15c2dd13b
opsxcq/exploit-cve-2017-7494
Sources for CVE-2017-7494
38 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files36
opsxcq/exploit-cve-2017-7494Revision 4d0bde4f1a7d
- ↑..Parent directory
- Makefile.longarg
- bigfd.c
- bigfd.exp
- domusers.exp
- envvar.exp
- finger.exp
- getent.c
- getent.exp
- getent_grent.c
- getent_pwent.c
- getent_r.sh
- getgrent_r.c
- getgrent_r.exp
- getgrgid.c
- getgrgid.exp
- getgrnam.c
- getgrnam.exp
- getpwent_r.c
- getpwent_r.exp
- getpwnam.c
- getpwnam.exp
- getpwuid.c
- getpwuid.exp
- groupmem_dom.exp
- initgroups.c
- initgroups.exp
- login.exp
- longarg.exp
- longarg_getgrnam.c
- longarg_getpwnam.c
- longarg_utils.h
- nss_winbind_syms.c
- nss_winbind_syms.exp
- pam_winbind_syms.c
- pam_winbind_syms.exp
- wbinfo.exp
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/testsuite/nsswitch/getgrgid.c
C · 1,078 bytes/*
* Lookup a group by gid.
*/
#include <stdio.h>
#include <grp.h>
#include <sys/types.h>
int main(int argc, char **argv)
{
struct group *gr;
gid_t gid;
/* Check args */
if (argc != 2) {
printf("ERROR: no arg specified\n");
exit(1);
}
if ((gid = atoi(argv[1])) == 0) {
printf("ERROR: invalid gid specified\n");
exit(1);
}
/* Do getgrgid() */
if ((gr = getgrgid(gid)) == NULL) {
printf("FAIL: gid %d does not exist\n", gid);
exit(1);
}
/* Print group info */
printf("PASS: gid %d exists\n", gid);
printf("gr_name = %s\n", gr->gr_name);
printf("gr_passwd = %s\n", gr->gr_passwd);
printf("gr_gid = %d\n", gr->gr_gid);
/* Group membership */
if (gr->gr_mem != NULL) {
int i = 0;
printf("gr_mem = ");
while(gr->gr_mem[i] != NULL) {
printf("%s", gr->gr_mem[i]);
i++;
if (gr->gr_mem != NULL) {
printf(",");
}
}
printf("\n");
}
exit(0);
}