summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kozadaev <denis@dilos.org>2023-06-12 21:19:39 +0300
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-06-13 17:11:19 +0900
commite4e948060df1bb40207cc62b0d231f3b147c7b16 (patch)
tree2e2e6e094f6d7642dcfe3270e77fe6e50f184b18
parent0e6f6f70f4ac3c8664f661b1ab7a2148f57108ac (diff)
downloadtdebase-e4e948060df1bb40207cc62b0d231f3b147c7b16.tar.gz
tdebase-e4e948060df1bb40207cc62b0d231f3b147c7b16.zip
SunOS UID scheme
Signed-off-by: Denis Kozadaev <denis@dilos.org> (cherry picked from commit bcd2bfcdc49dcf97b730889d5554b15623072a40)
-rw-r--r--kcontrol/tdm/tdm-users.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/kcontrol/tdm/tdm-users.cpp b/kcontrol/tdm/tdm-users.cpp
index fe2f31c65..d8fbd6bcd 100644
--- a/kcontrol/tdm/tdm-users.cpp
+++ b/kcontrol/tdm/tdm-users.cpp
@@ -48,7 +48,7 @@ extern KSimpleConfig *config;
TDMUsersWidget::TDMUsersWidget(TQWidget *parent, const char *name)
: TQWidget(parent, name)
{
-#ifdef __linux__
+#ifdef Q_OS_LINUX
struct stat st;
if (!stat( "/etc/debian_version", &st )) { /* debian */
defminuid = "1000";
@@ -66,10 +66,18 @@ TDMUsersWidget::TDMUsersWidget(TQWidget *parent, const char *name)
defminuid = "500";
defmaxuid = "65000";
}
-#else
+#elif defined(Q_OS_SOLARIS)
+ struct stat st;
+ if (stat( "/etc/dilos_version_build", &st ) == 0) { /* DilOS */
+ defminuid = "1000";
+ } else { /* other illumos distro */
+ defminuid = "100";
+ }
+ defmaxuid = "60000";
+#else /* default */
defminuid = "1000";
defmaxuid = "65000";
-#endif
+#endif /* default */
// We assume that $kde_datadir/tdm exists, but better check for pics/ and pics/users,
// and create them if necessary.