CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
pwd.c
Go to the documentation of this file.
1/* FUNCTION: getpwnam */
2
3#ifndef _WIN32
4
5# ifndef __CPROVER_PWD_H_INCLUDED
6# include <pwd.h>
7# define __CPROVER_PWD_H_INCLUDED
8# endif
9
11
13
14struct passwd *getpwnam(const char *name)
15{
16 // make some fields non-null
17 __CPROVER_passwd.pw_name = (char *)name;
20 return &__CPROVER_passwd;
21}
22
23#endif
24
25/* FUNCTION: getpwuid */
26
27#ifndef _WIN32
28
29# ifndef __CPROVER_PWD_H_INCLUDED
30# include <pwd.h>
31# define __CPROVER_PWD_H_INCLUDED
32# endif
33
34unsigned __VERIFIER_nondet_unsigned(void);
35
36# ifndef LIBRARY_CHECK
38# endif
39
41{
42 // make some fields non-null
43 __CPROVER_passwd.pw_uid = uid;
45 return &__CPROVER_passwd;
46}
47
48#endif
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
ait()
Definition ai.h:565
struct passwd * getpwuid(uid_t uid)
Definition pwd.c:40
unsigned __VERIFIER_nondet_unsigned(void)
struct passwd * getpwnam(const char *name)
Definition pwd.c:14
struct passwd __CPROVER_passwd
Definition pwd.c:12