fix users with large uid
This commit is contained in:
parent
a23f7d42b3
commit
45dce4ff41
4
main.c
4
main.c
|
@ -41,7 +41,7 @@ int bgUsers[1] = {
|
||||||
C_L_GREEN // UID 1000
|
C_L_GREEN // UID 1000
|
||||||
};
|
};
|
||||||
|
|
||||||
// COLOR FOR USERS UID < 1000
|
// COLOR FOR USERS UID < 1000 || UID > 1010
|
||||||
int bgUserOther = C_L_YELLOW;
|
int bgUserOther = C_L_YELLOW;
|
||||||
|
|
||||||
int bgHost = C_L_CYAN;
|
int bgHost = C_L_CYAN;
|
||||||
|
@ -106,7 +106,7 @@ int main(void) {
|
||||||
uid_t uid = getuid();
|
uid_t uid = getuid();
|
||||||
if (uid == 0) {
|
if (uid == 0) {
|
||||||
bgUser = bgUserRoot;
|
bgUser = bgUserRoot;
|
||||||
} else if (uid >= 1000) {
|
} else if (uid >= 1000 && uid <= 1010) {
|
||||||
bgUser = bgUsers[uid - 1000];
|
bgUser = bgUsers[uid - 1000];
|
||||||
} else {
|
} else {
|
||||||
bgUser = bgUserOther;
|
bgUser = bgUserOther;
|
||||||
|
|
Reference in New Issue