Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/accountsservice-0.6.55/src/accounts-daemon.h
Examining data/accountsservice-0.6.55/src/daemon.h
Examining data/accountsservice-0.6.55/src/extensions.c
Examining data/accountsservice-0.6.55/src/fgetpwent.c
Examining data/accountsservice-0.6.55/src/libaccountsservice/act-user-manager.h
Examining data/accountsservice-0.6.55/src/libaccountsservice/act-user-private.h
Examining data/accountsservice-0.6.55/src/libaccountsservice/act-user.c
Examining data/accountsservice-0.6.55/src/libaccountsservice/act-user.h
Examining data/accountsservice-0.6.55/src/libaccountsservice/act.h
Examining data/accountsservice-0.6.55/src/libaccountsservice/act-user-manager.c
Examining data/accountsservice-0.6.55/src/main.c
Examining data/accountsservice-0.6.55/src/types.h
Examining data/accountsservice-0.6.55/src/user-classify.c
Examining data/accountsservice-0.6.55/src/user-classify.h
Examining data/accountsservice-0.6.55/src/user.h
Examining data/accountsservice-0.6.55/src/util.c
Examining data/accountsservice-0.6.55/src/util.h
Examining data/accountsservice-0.6.55/src/wtmp-helper.c
Examining data/accountsservice-0.6.55/src/wtmp-helper.h
Examining data/accountsservice-0.6.55/src/daemon.c
Examining data/accountsservice-0.6.55/src/user.c

FINAL RESULTS:

data/accountsservice-0.6.55/src/libaccountsservice/act-user-manager.c:48:27:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0)
data/accountsservice-0.6.55/src/libaccountsservice/act-user.c:1619:26:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        return g_strdup (crypt (plain, salt->str));
data/accountsservice-0.6.55/src/user.c:328:53:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                                     gboolean       system)
data/accountsservice-0.6.55/src/user.c:330:65:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        accounts_user_set_system_account (ACCOUNTS_USER (user), system);
data/accountsservice-0.6.55/src/user.h:65:68:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                                                    gboolean       system);
data/accountsservice-0.6.55/src/libaccountsservice/act-user.c:1599:21:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        return salt[g_rand_int_range (rand, 0, G_N_ELEMENTS (salt))];
data/accountsservice-0.6.55/src/daemon.c:177:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buf[1024];
data/accountsservice-0.6.55/src/daemon.c:191:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                fp = fopen (PATH_SHADOW, "r");
data/accountsservice-0.6.55/src/daemon.c:223:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                fp = fopen (PATH_PASSWD, "r");
data/accountsservice-0.6.55/src/util.c:216:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open ("/proc/self/loginuid", O_WRONLY);
data/accountsservice-0.6.55/src/extensions.c:126:82:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if (g_str_has_prefix (symlink, prefix) && g_str_equal (symlink + strlen (prefix), name)) {
data/accountsservice-0.6.55/src/fgetpwent.c:41:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      str.len = strlen (str.str + str.len) + str.len;
data/accountsservice-0.6.55/src/libaccountsservice/act-user.c:1653:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        memset (crypted, 0, strlen (crypted));
data/accountsservice-0.6.55/src/user-classify.c:94:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                if (strlen (password_hash) < 4)
data/accountsservice-0.6.55/src/user.c:1948:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        memset (strings[0], 0, strlen (strings[0]));
data/accountsservice-0.6.55/src/user.c:1987:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        memset ((char*)password, 0, strlen (password));
data/accountsservice-0.6.55/src/util.c:177:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy (loginuid, buf, size);
data/accountsservice-0.6.55/src/util.c:217:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        write (fd, id, strlen (id));

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 11314 in approximately 0.31 seconds (36273 lines/second)
Physical Source Lines of Code (SLOC) = 8011
Hits@level = [0]   2 [1]   8 [2]   4 [3]   1 [4]   5 [5]   0
Hits@level+ = [0+]  20 [1+]  18 [2+]  10 [3+]   6 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 2.49657 [1+] 2.24691 [2+] 1.24828 [3+] 0.74897 [4+] 0.624142 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.