]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/, src/: Fix formatting
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 16 Dec 2025 21:59:59 +0000 (22:59 +0100)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Tue, 16 Dec 2025 22:20:32 +0000 (23:20 +0100)
Fix places where spaces were used instead of tabs.

No functional change.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
23 files changed:
lib/atoi/a2i.h
lib/chkname.c
lib/commonio.h
lib/copydir.c
lib/exit_if_null.h
lib/find_new_gid.c
lib/find_new_uid.c
lib/logind.c
lib/string/strchr/strnul.h
lib/string/strcmp/strcaseprefix.h
lib/string/strcmp/strprefix.h
lib/string/strspn/stprcspn.h
lib/string/strspn/stprspn.h
lib/string/strspn/stpspn.h
lib/subordinateio.c
src/chgpasswd.c
src/chpasswd.c
src/chsh.c
src/groupdel.c
src/newusers.c
src/su.c
src/useradd.c
src/usermod.c

index 74a34a282c0a79b4adfbbe4d772d59ac16a9ca88..6d67496fe49cf63590153e51e851bf1152dd58bb 100644 (file)
@@ -23,9 +23,9 @@
        QChar_of(s)  **endp_ = endp;                                  \
        T            min_ = min;                                      \
        T            max_ = max;                                      \
-                                                                      \
+                                                                     \
        int  status;                                                  \
-                                                                      \
+                                                                     \
        *n_ = _Generic((T){},                                         \
                short:              strtoi_,                          \
                int:                strtoi_,                          \
@@ -36,7 +36,7 @@
                unsigned long:      strtou_noneg,                     \
                unsigned long long: strtou_noneg                      \
        )(s, (char **) endp_, base, min_, max_, &status);             \
-                                                                      \
+                                                                     \
        if (status != 0)                                              \
                errno = status;                                       \
        -!!status;                                                    \
index c8e0066d2751ab2f8bed9f4858178960f29b6bde..6abd34fffa95cf604504cdee741c0138dcbd3a02 100644 (file)
@@ -64,14 +64,14 @@ is_valid_name(const char *name)
        }
 
        /*
-         * User/group names must match BRE regex:
-         *    [a-zA-Z0-9_.][a-zA-Z0-9_.-]*$\?
-         *
-         * as a non-POSIX, extension, allow "$" as the last char for
-         * sake of Samba 3.x "add machine script"
-         *
-         * Also do not allow fully numeric names or just "." or "..".
-         */
+        * User/group names must match BRE regex:
+        *    [a-zA-Z0-9_.][a-zA-Z0-9_.-]*$\?
+        *
+        * as a non-POSIX, extension, allow "$" as the last char for
+        * sake of Samba 3.x "add machine script"
+        *
+        * Also do not allow fully numeric names or just "." or "..".
+        */
 
        if (strisdigit(name)) {
                errno = EINVAL;
index 2e86d561d4e723243f369cd480c98c08e42562d7..8507e0e477b012e8a6c7d1be7aea366513cb92bb 100644 (file)
@@ -94,7 +94,7 @@ struct commonio_db {
 #endif
        /*
         * Default permissions and owner for newly created data file.
-         */
+        */
        mode_t st_mode;
        uid_t st_uid;
        gid_t st_gid;
index 27bc1a630580664994b9ce6a036230e9874aa409..796015afbbc32c78e33ee2bad11ae56a261496c9 100644 (file)
@@ -501,14 +501,14 @@ static int copy_dir (const struct path_info *src, const struct path_info *dst,
                return -1;
        }
 #endif                         /* WITH_SELINUX */
-        /*
-         * If the destination is already a directory, don't change it
-         * but copy into it (recursively).
-        */
-        if (fstatat(dst->dirfd, dst->name, &dst_sb, AT_SYMLINK_NOFOLLOW) == 0 && S_ISDIR(dst_sb.st_mode)) {
-            return (copy_tree_impl (src, dst, false, reset_selinux,
-                           old_uid, new_uid, old_gid, new_gid) != 0);
-        }
+       /*
+        * If the destination is already a directory, don't change it
+        * but copy into it (recursively).
+        */
+       if (fstatat(dst->dirfd, dst->name, &dst_sb, AT_SYMLINK_NOFOLLOW) == 0 && S_ISDIR(dst_sb.st_mode)) {
+               return (copy_tree_impl (src, dst, false, reset_selinux,
+                              old_uid, new_uid, old_gid, new_gid) != 0);
+       }
 
        if (   (mkdirat (dst->dirfd, dst->name, 0700) != 0)
            || (chownat_if_needed (dst, statp,
@@ -798,7 +798,7 @@ static int chown_function ## _if_needed (type_dst dst,                 \
 {                                                                      \
        uid_t tmpuid = (uid_t) -1;                                     \
        gid_t tmpgid = (gid_t) -1;                                     \
-                                                                       \
+                                                                      \
        /* Use new_uid if old_uid is set to -1 or if the file was      \
         * owned by the user. */                                       \
        if (((uid_t) -1 == old_uid) || (statp->st_uid == old_uid)) {   \
@@ -809,14 +809,14 @@ static int chown_function ## _if_needed (type_dst dst,                 \
        if ((uid_t) -1 == tmpuid) {                                    \
                tmpuid = statp->st_uid;                                \
        }                                                              \
-                                                                       \
+                                                                      \
        if (((gid_t) -1 == old_gid) || (statp->st_gid == old_gid)) {   \
                tmpgid = new_gid;                                      \
        }                                                              \
        if ((gid_t) -1 == tmpgid) {                                    \
                tmpgid = statp->st_gid;                                \
        }                                                              \
-                                                                       \
+                                                                      \
        return chown_function (dst, tmpuid, tmpgid);                   \
 }
 
index 708908b5b4814a28f85c4e3d21a5c00461e70000..6045bbcd15706b1f68c92655787d819c4403ebd7 100644 (file)
@@ -26,7 +26,7 @@
 #define exit_if_null(p)                                               \
 ({                                                                    \
        __auto_type  p_ = p;                                          \
-                                                                      \
+                                                                     \
        exit_if_null_(p_);                                            \
        p_;                                                           \
 })
index dfcc9143d87ec436dfb1b38b5a22a6ad6f779137..a716445a52f81be48b35f636a2a50d14e6c934a7 100644 (file)
@@ -56,11 +56,11 @@ static int get_ranges (bool sys_group, gid_t *min_id, gid_t *max_id,
                /* Check that the ranges make sense */
                if (*max_id < *min_id) {
                        (void) fprintf (log_get_logfd(),
-                            _("%s: Invalid configuration: SYS_GID_MIN (%lu), "
-                              "GID_MIN (%lu), SYS_GID_MAX (%lu)\n"),
-                            log_get_progname(), (unsigned long) *min_id,
-                            getdef_ulong ("GID_MIN", 1000UL),
-                            (unsigned long) *max_id);
+                           _("%s: Invalid configuration: SYS_GID_MIN (%lu), "
+                             "GID_MIN (%lu), SYS_GID_MAX (%lu)\n"),
+                           log_get_progname(), (unsigned long) *min_id,
+                           getdef_ulong ("GID_MIN", 1000UL),
+                           (unsigned long) *max_id);
                        return EINVAL;
                }
                /*
index 3cafef603ad1197d5fd9efd47a3514970ab549fd..d2e9d1f69b40788c4405035a9fe97f42f60e1932 100644 (file)
@@ -55,11 +55,11 @@ static int get_ranges (bool sys_user, uid_t *min_id, uid_t *max_id,
                /* Check that the ranges make sense */
                if (*max_id < *min_id) {
                        (void) fprintf (log_get_logfd(),
-                            _("%s: Invalid configuration: SYS_UID_MIN (%lu), "
-                              "UID_MIN (%lu), SYS_UID_MAX (%lu)\n"),
-                            log_get_progname(), (unsigned long) *min_id,
-                            getdef_ulong ("UID_MIN", 1000UL),
-                            (unsigned long) *max_id);
+                           _("%s: Invalid configuration: SYS_UID_MIN (%lu), "
+                             "UID_MIN (%lu), SYS_UID_MAX (%lu)\n"),
+                           log_get_progname(), (unsigned long) *min_id,
+                           getdef_ulong ("UID_MIN", 1000UL),
+                           (unsigned long) *max_id);
                        return EINVAL;
                }
                /*
index b1ed632bbe044f48d8b8b378870278300563843d..3ba3341af0418ff16697daf4e59a5ac5b29df37c 100644 (file)
 
 int get_session_host (char **out, pid_t main_pid)
 {
-    char *host = NULL;
-    char *session = NULL;
-    int ret;
+       char *host = NULL;
+       char *session = NULL;
+       int ret;
 
-    ret = sd_pid_get_session(main_pid, &session);
-    if (ret < 0) {
-        return ret;
-    }
-    ret = sd_session_get_remote_host (session, &host);
-    if (ret < 0) {
-        goto done;
-    }
+       ret = sd_pid_get_session(main_pid, &session);
+       if (ret < 0) {
+               return ret;
+       }
+       ret = sd_session_get_remote_host (session, &host);
+       if (ret < 0) {
+               goto done;
+       }
 
-    *out = host;
+       *out = host;
 
 done:
-    free (session);
-    return ret;
+       free (session);
+       return ret;
 }
 
 unsigned long active_sessions_count(const char *name, unsigned long)
 {
-    struct passwd *pw;
-    unsigned long count = 0;
+       struct passwd *pw;
+       unsigned long count = 0;
 
-    pw = prefix_getpwnam(name);
-    if (pw == NULL) {
-        return 0;
-    }
+       pw = prefix_getpwnam(name);
+       if (pw == NULL) {
+               return 0;
+       }
 
-    count = sd_uid_get_sessions(pw->pw_uid, 0, NULL);
+       count = sd_uid_get_sessions(pw->pw_uid, 0, NULL);
 
-    return count;
+       return count;
 }
index 78bcdd9f30e3882558db2e811ed0b13fff05d0d7..4cb3b2ca6a7e5f76c57ffda7b7be4fdf9a900a14 100644 (file)
@@ -18,7 +18,7 @@
 #define strnul(s)                                                             \
 ({                                                                            \
        __auto_type  s_ = s;                                                  \
-                                                                              \
+                                                                             \
        s_ + strlen(s_);                                                      \
 })
 
index 9982d10328969d25e5bf602594aa8a523381e157..b001076b6b4a7f22df728917578f21099e77e87b 100644 (file)
@@ -19,9 +19,9 @@
 #define strcaseprefix(s, prefix)                                      \
 ({                                                                    \
        const char  *p_;                                              \
-                                                                      \
+                                                                     \
        p_ = strcaseprefix_(s, prefix);                               \
-                                                                      \
+                                                                     \
        _Generic(s,                                                   \
                const char *:                     p_,                 \
                const void *:                     p_,                 \
index a9e43815778f4263e6bdcbd1233db28ea2a86278..3abffb5f4e87064729f7e6e0cdf273a2810c3924 100644 (file)
@@ -19,9 +19,9 @@
 #define strprefix(s, prefix)                                          \
 ({                                                                    \
        const char  *p_;                                              \
-                                                                      \
+                                                                     \
        p_ = strprefix_(s, prefix);                                   \
-                                                                      \
+                                                                     \
        _Generic(s,                                                   \
                const char *:                     p_,                 \
                const void *:                     p_,                 \
index dc898787e6579a9be6c2ecfd2bdfdbc429cb11eb..d9cf10773a91e6cbd67a5e033eeb68cfa23e0e5c 100644 (file)
@@ -17,7 +17,7 @@
 #define stprcspn(s, reject)                                                   \
 ({                                                                            \
        __auto_type  s_ = (s);                                                \
-                                                                              \
+                                                                             \
        s_ + strrcspn(s_, reject);                                            \
 })
 
index a7131b6098587debf633064e95a350586ad60996..8684f9ef63f2c63cf7da34442bc225b17c05b3f2 100644 (file)
@@ -19,7 +19,7 @@
 #define stprspn(s, accept)                                                    \
 ({                                                                            \
        __auto_type  s_ = (s);                                                \
-                                                                              \
+                                                                             \
        s_ + strrspn_(s_, accept);                                            \
 })
 
index ccf9a343cf9de2bb828ff3b119c5148bfae63fe4..1834f5fcdae60d34b1b1e714e69787d4c59b59cf 100644 (file)
@@ -19,7 +19,7 @@
 #define stpspn(s, accept)                                                     \
 ({                                                                            \
        __auto_type  s_ = s;                                                  \
-                                                                              \
+                                                                             \
        s_ + strspn(s_, accept);                                              \
 })
 
index b038379ef316c11df65476bc30a21b5deebccc18..b2cadfd02e4ef11f02d3581383bfe95d3c23e06e 100644 (file)
@@ -198,74 +198,74 @@ static const struct subordinate_range *find_range(struct commonio_db *db,
        }
 
 
-        /*
-         * We only do special handling for these two files
-         */
-        if (!streq(db->filename, SUBUID_FILE) && !streq(db->filename, SUBGID_FILE))
-                return NULL;
-
-        /*
-         * Search loop above did not produce any result. Let's rerun it,
-         * but this time try to match actual UIDs. The first entry that
-         * matches is considered a success.
-         * (It may be specified as literal UID or as another username which
-         * has the same UID as the username we are looking for.)
-         */
-        char           owner_uid_string[33];
-        uid_t          owner_uid;
-        struct passwd  *pwd;
-
-
-        /* Get UID of the username we are looking for */
-        pwd = getpwnam(owner);
-        if (NULL == pwd) {
-                /* Username not defined in /etc/passwd, or error occurred during lookup */
-                return NULL;
-        }
-        owner_uid = pwd->pw_uid;
-        if (stprintf_a(owner_uid_string, "%lu", (unsigned long) owner_uid) == -1)
-                return NULL;
-
-        commonio_rewind(db);
-        while (NULL != (range = commonio_next(db))) {
-                unsigned long first = range->start;
-                unsigned long last = first + range->count - 1;
-
-                /* For performance reasons check range before using getpwnam() */
-                if ((val < first) || (val > last)) {
-                        continue;
-                }
-
-                /*
-                 * Range matches. Check if range owner is specified
-                 * as numeric UID and if it matches.
-                 */
-                if (streq(range->owner, owner_uid_string)) {
-                        return range;
-                }
-
-                /*
-                 * Ok, this range owner is not specified as numeric UID
-                 * we are looking for. It may be specified as another
-                 * UID or as a literal username.
-                 *
-                 * If specified as another UID, the call to getpwnam()
-                 * will return NULL.
-                 *
-                 * If specified as literal username, we will get its
-                 * UID and compare that to UID we are looking for.
-                 */
-                const struct passwd *range_owner_pwd;
-
-                range_owner_pwd = getpwnam(range->owner);
-                if (NULL == range_owner_pwd) {
-                        continue;
-                }
-
-                if (owner_uid == range_owner_pwd->pw_uid) {
-                        return range;
-                }
-        }
+       /*
+        * We only do special handling for these two files
+        */
+       if (!streq(db->filename, SUBUID_FILE) && !streq(db->filename, SUBGID_FILE))
+               return NULL;
+
+       /*
+        * Search loop above did not produce any result. Let's rerun it,
+        * but this time try to match actual UIDs. The first entry that
+        * matches is considered a success.
+        * (It may be specified as literal UID or as another username which
+        * has the same UID as the username we are looking for.)
+        */
+       char           owner_uid_string[33];
+       uid_t          owner_uid;
+       struct passwd  *pwd;
+
+
+       /* Get UID of the username we are looking for */
+       pwd = getpwnam(owner);
+       if (NULL == pwd) {
+               /* Username not defined in /etc/passwd, or error occurred during lookup */
+               return NULL;
+       }
+       owner_uid = pwd->pw_uid;
+       if (stprintf_a(owner_uid_string, "%lu", (unsigned long) owner_uid) == -1)
+               return NULL;
+
+       commonio_rewind(db);
+       while (NULL != (range = commonio_next(db))) {
+               unsigned long first = range->start;
+               unsigned long last = first + range->count - 1;
+
+               /* For performance reasons check range before using getpwnam() */
+               if ((val < first) || (val > last)) {
+                       continue;
+               }
+
+               /*
+                * Range matches. Check if range owner is specified
+                * as numeric UID and if it matches.
+                */
+               if (streq(range->owner, owner_uid_string)) {
+                       return range;
+               }
+
+               /*
+                * Ok, this range owner is not specified as numeric UID
+                * we are looking for. It may be specified as another
+                * UID or as a literal username.
+                *
+                * If specified as another UID, the call to getpwnam()
+                * will return NULL.
+                *
+                * If specified as literal username, we will get its
+                * UID and compare that to UID we are looking for.
+                */
+               const struct passwd *range_owner_pwd;
+
+               range_owner_pwd = getpwnam(range->owner);
+               if (NULL == range_owner_pwd) {
+                       continue;
+               }
+
+               if (owner_uid == range_owner_pwd->pw_uid) {
+                       return range;
+               }
+       }
 
        return NULL;
 }
index 9d87bb17bdf532950eafae93aa400f7fe107b5ae..38e9eae173de89efc0098bc1b6cbb42ece45081d 100644 (file)
@@ -200,7 +200,7 @@ static void process_flags (int argc, char **argv, struct option_flags *flags)
 #if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT) || defined(USE_YESCRYPT)
                case 's':
                        sflg = true;
-                        bad_s = 0;
+                       bad_s = 0;
 
                        if (!crypt_method) {
                                fprintf (stderr,
@@ -211,22 +211,22 @@ static void process_flags (int argc, char **argv, struct option_flags *flags)
 #if defined(USE_SHA_CRYPT)
                        if (  (   (streq(crypt_method, "SHA256") || streq(crypt_method, "SHA512"))
                               && (-1 == str2sl(&sha_rounds, optarg)))) {
-                            bad_s = 1;
-                        }
+                               bad_s = 1;
+                       }
 #endif                         /* USE_SHA_CRYPT */
 #if defined(USE_BCRYPT)
-                        if ((   streq(crypt_method, "BCRYPT")
+                       if (  (   streq(crypt_method, "BCRYPT")
                               && (-1 == str2sl(&bcrypt_rounds, optarg)))) {
-                            bad_s = 1;
-                        }
+                               bad_s = 1;
+                       }
 #endif                         /* USE_BCRYPT */
 #if defined(USE_YESCRYPT)
-                        if ((   streq(crypt_method, "YESCRYPT")
+                       if (  (   streq(crypt_method, "YESCRYPT")
                               && (-1 == str2sl(&yescrypt_cost, optarg)))) {
-                            bad_s = 1;
-                        }
+                               bad_s = 1;
+                       }
 #endif                         /* USE_YESCRYPT */
-                        if (bad_s != 0) {
+                       if (bad_s != 0) {
                                fprintf (stderr,
                                         _("%s: invalid numeric argument '%s'\n"),
                                         Prog, optarg);
index b53660818e0c76877be003077a9f045499f4d471..ea96dc74919d1fa3e179c23826274730851308aa 100644 (file)
@@ -159,7 +159,7 @@ static void process_flags (int argc, char **argv, struct option_flags *flags)
 {
        int c;
 #if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT) || defined(USE_YESCRYPT)
-        int bad_s;
+       int bad_s;
 #endif                         /* USE_SHA_CRYPT || USE_BCRYPT || USE_YESCRYPT */
        static struct option long_options[] = {
                {"crypt-method", required_argument, NULL, 'c'},
@@ -203,26 +203,26 @@ static void process_flags (int argc, char **argv, struct option_flags *flags)
 #if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT) || defined(USE_YESCRYPT)
                case 's':
                        sflg = true;
-                        bad_s = 0;
+                       bad_s = 0;
 #if defined(USE_SHA_CRYPT)
                        if ((IS_CRYPT_METHOD("SHA256") || IS_CRYPT_METHOD("SHA512"))
                            && (-1 == str2sl(&sha_rounds, optarg))) {
-                            bad_s = 1;
-                        }
+                               bad_s = 1;
+                       }
 #endif                         /* USE_SHA_CRYPT */
 #if defined(USE_BCRYPT)
-                        if (IS_CRYPT_METHOD("BCRYPT")
+                       if (IS_CRYPT_METHOD("BCRYPT")
                            && (-1 == str2sl(&bcrypt_rounds, optarg))) {
-                            bad_s = 1;
-                        }
+                               bad_s = 1;
+                       }
 #endif                         /* USE_BCRYPT */
 #if defined(USE_YESCRYPT)
-                        if (IS_CRYPT_METHOD("YESCRYPT")
+                       if (IS_CRYPT_METHOD("YESCRYPT")
                            && (-1 == str2sl(&yescrypt_cost, optarg))) {
-                            bad_s = 1;
-                        }
+                               bad_s = 1;
+                       }
 #endif                         /* USE_YESCRYPT */
-                        if (bad_s != 0) {
+                       if (bad_s != 0) {
                                fprintf (stderr,
                                         _("%s: invalid numeric argument '%s'\n"),
                                         Prog, optarg);
index 0c2f7f6b808f85903a161f4256f9443b2200078a..0cfe26ee87b098d4ca07a260d3e73e0b7b2d19cd 100644 (file)
@@ -326,7 +326,7 @@ static void check_perms(const struct passwd *pw, const struct option_flags *flag
         */
        if (!amroot && getdef_bool ("CHSH_AUTH")) {
                passwd_check(pw->pw_name, pw->pw_passwd);
-        }
+       }
 
 #else                          /* !USE_PAM */
        pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */
index 2ef4fd8c6cc04d46745addcaf6f885cfacbe5c7d..5b4bb8d1f8cf28939d73d3980a65860f4a7cf7af 100644 (file)
@@ -97,7 +97,7 @@ static void fail_exit(int status)
 {
 #ifdef WITH_AUDIT
        audit_logger(AUDIT_GRP_MGMT, "delete-group", group_name,
-                        AUDIT_NO_ID, SHADOW_AUDIT_FAILURE);
+                       AUDIT_NO_ID, SHADOW_AUDIT_FAILURE);
 #endif
        exit (status);
 }
index ab16a219c6dd83b96a64a2559722446b7a0ed153..8af65b7a2bb1d58af5fe65d3aafdba4f18d5ba14 100644 (file)
@@ -139,7 +139,7 @@ static void usage (int status)
 #ifndef USE_PAM
        (void) fprintf (usageout,
                        _("  -c, --crypt-method METHOD     the crypt method (one of %s)\n"),
-                        "NONE DES MD5"
+                       "NONE DES MD5"
 #if defined(USE_SHA_CRYPT)
                        " SHA256 SHA512"
 #endif
@@ -635,7 +635,7 @@ static void process_flags (int argc, char **argv, struct option_flags *flags)
        int c;
 #ifndef USE_PAM
 #if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT) || defined(USE_YESCRYPT)
-        int bad_s;
+       int bad_s;
 #endif                         /* USE_SHA_CRYPT || USE_BCRYPT || USE_YESCRYPT */
 #endif                                 /* !USE_PAM */
        static struct option long_options[] = {
@@ -687,7 +687,7 @@ static void process_flags (int argc, char **argv, struct option_flags *flags)
 #if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT) || defined(USE_YESCRYPT)
                case 's':
                        sflg = true;
-                        bad_s = 0;
+                       bad_s = 0;
 
                        if (!crypt_method){
                                fprintf(stderr,
@@ -698,22 +698,22 @@ static void process_flags (int argc, char **argv, struct option_flags *flags)
 #if defined(USE_SHA_CRYPT)
                        if (  (   (streq(crypt_method, "SHA256") || streq(crypt_method, "SHA512"))
                               && (-1 == str2sl(&sha_rounds, optarg)))) {
-                            bad_s = 1;
-                        }
+                               bad_s = 1;
+                       }
 #endif                         /* USE_SHA_CRYPT */
 #if defined(USE_BCRYPT)
-                        if ((   streq(crypt_method, "BCRYPT")
+                       if (  (   streq(crypt_method, "BCRYPT")
                               && (-1 == str2sl(&bcrypt_rounds, optarg)))) {
-                            bad_s = 1;
-                        }
+                               bad_s = 1;
+                       }
 #endif                         /* USE_BCRYPT */
 #if defined(USE_YESCRYPT)
-                        if ((   streq(crypt_method, "YESCRYPT")
+                       if (  (   streq(crypt_method, "YESCRYPT")
                               && (-1 == str2sl(&yescrypt_cost, optarg)))) {
-                            bad_s = 1;
-                        }
+                               bad_s = 1;
+                       }
 #endif                         /* USE_YESCRYPT */
-                        if (bad_s != 0) {
+                       if (bad_s != 0) {
                                fprintf (stderr,
                                         _("%s: invalid numeric argument '%s'\n"),
                                         Prog, optarg);
index e9b3f0f7bb415003019ec95994691e3e455460f5..583979c20f80b0a2abba0f9818f969831d14efc8 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -979,10 +979,10 @@ static void set_environment (struct passwd *pw)
                }
 
 #ifdef USE_PAM
-               /* we need to setup the environment *after* pam_open_session(),
-                 * else the UID is changed before stuff like pam_xauth could
-                 * run, and we cannot access /etc/shadow and co
-                 */
+               /* we need to setup the environment *after* pam_open_session(),
+                * else the UID is changed before stuff like pam_xauth could
+                * run, and we cannot access /etc/shadow and co
+                */
                /* update environment with all pam set variables */
                char **envcp = pam_getenvlist (pamh);
                if (NULL != envcp) {
index c179ff4aad3160d686aedcbb6036c1ba69ecb96c..e248cfbda6c527958f8a65b5143debb164f77855 100644 (file)
@@ -537,7 +537,7 @@ set_defaults(void)
                fprintf(stderr, _("%s: cannot create new defaults file: %s\n"),
                        Prog, strerrno());
                return -1;
-        }
+       }
 
        if (prefix[0]) {
                default_file = aprintf("%s/%s", prefix, USER_DEFAULTS_FILE);
index 074b41fe20d3ca60571bb0baf3eb7512cc428ad7..2418514dd326b80dc3f797268c5e4198ca5b8a12 100644 (file)
@@ -1237,7 +1237,7 @@ process_flags(int argc, char **argv, struct option_flags *flags)
                                        exit(E_BAD_ARG);
                                }
                                wflg = true;
-                break;
+                               break;
                        case 'W':
                                if (prepend_range (optarg, &del_sub_gids) == 0) {
                                        fprintf (stderr,