|
35 | 35 | #include "shadowlog_internal.h" |
36 | 36 | #include "sssd.h" |
37 | 37 | #include "string/memset/memzero.h" |
38 | | -#include "string/sprintf/snprintf.h" |
| 38 | +#include "string/sprintf/stprintf.h" |
39 | 39 | #include "string/strcmp/streq.h" |
40 | 40 | #include "string/strtok/stpsep.h" |
41 | 41 |
|
@@ -146,7 +146,7 @@ static int do_lock_file (const char *file, const char *lock, bool log) |
146 | 146 | } |
147 | 147 |
|
148 | 148 | pid = getpid (); |
149 | | - SNPRINTF(buf, "%lu", (unsigned long) pid); |
| 149 | + STPRINTF(buf, "%lu", (unsigned long) pid); |
150 | 150 | len = (ssize_t) strlen (buf) + 1; |
151 | 151 | if (write_full(fd, buf, len) == -1) { |
152 | 152 | if (log) { |
@@ -347,7 +347,7 @@ static void free_linked_list (struct commonio_db *db) |
347 | 347 |
|
348 | 348 | int commonio_setname (struct commonio_db *db, const char *name) |
349 | 349 | { |
350 | | - SNPRINTF(db->filename, "%s", name); |
| 350 | + STPRINTF(db->filename, "%s", name); |
351 | 351 | db->setname = true; |
352 | 352 | return 1; |
353 | 353 | } |
@@ -490,7 +490,7 @@ int commonio_unlock (struct commonio_db *db) |
490 | 490 | * then call ulckpwdf() (if used) on last unlock. |
491 | 491 | */ |
492 | 492 | db->locked = false; |
493 | | - SNPRINTF(lock, "%s.lock", db->filename); |
| 493 | + STPRINTF(lock, "%s.lock", db->filename); |
494 | 494 | unlink (lock); |
495 | 495 | dec_lock_count (); |
496 | 496 | return 1; |
@@ -924,7 +924,7 @@ int commonio_close (struct commonio_db *db) |
924 | 924 | /* |
925 | 925 | * Create backup file. |
926 | 926 | */ |
927 | | - if (SNPRINTF(buf, "%s-", db->filename) == -1) { |
| 927 | + if (STPRINTF(buf, "%s-", db->filename) == -1) { |
928 | 928 | (void) fclose (db->fp); |
929 | 929 | db->fp = NULL; |
930 | 930 | goto fail; |
@@ -961,7 +961,7 @@ int commonio_close (struct commonio_db *db) |
961 | 961 | sb.st_gid = db->st_gid; |
962 | 962 | } |
963 | 963 |
|
964 | | - if (SNPRINTF(buf, "%s+", db->filename) == -1) |
| 964 | + if (STPRINTF(buf, "%s+", db->filename) == -1) |
965 | 965 | goto fail; |
966 | 966 |
|
967 | 967 | #ifdef WITH_SELINUX |
|
0 commit comments