aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2005-08-16 08:13:10 +0000
committerFrederic Lepied <flepied@mandriva.com>2005-08-16 08:13:10 +0000
commit0fb5d0e2ff7df7b719f888323d5e58f3e5893ada (patch)
tree482905513d4914cb4798216ef9d5f8e9f5a2845f /share
parent9ace39be031375ecf16acadb58457e17a9f0faf8 (diff)
downloadmsec-0fb5d0e2ff7df7b719f888323d5e58f3e5893ada.tar
msec-0fb5d0e2ff7df7b719f888323d5e58f3e5893ada.tar.gz
msec-0fb5d0e2ff7df7b719f888323d5e58f3e5893ada.tar.bz2
msec-0fb5d0e2ff7df7b719f888323d5e58f3e5893ada.tar.xz
msec-0fb5d0e2ff7df7b719f888323d5e58f3e5893ada.zip
password_aging: really fix bug #17477 by not parsing the output of chage anymore.
Diffstat (limited to 'share')
-rw-r--r--share/libmsec.py55
1 files changed, 20 insertions, 35 deletions
diff --git a/share/libmsec.py b/share/libmsec.py
index d845bc9..bbb6ebd 100644
--- a/share/libmsec.py
+++ b/share/libmsec.py
@@ -1206,8 +1206,6 @@ Name must be put between '. Msec will then no more manage password aging for
name so you have to use chage(1) to manage it by hand.'''
no_aging_list.append(name)
-# TODO FL Sat Dec 29 20:18:20 2001
-# replace chage calls and /etc/shadow parsing by a python API to the shadow functions.
def password_aging(max, inactive=-1):
''' Set password aging to \\fImax\\fP days and delay to change to \\fIinactive\\fP.'''
uid_min = 500
@@ -1227,6 +1225,11 @@ def password_aging(max, inactive=-1):
continue
name = field[0]
password = field[1]
+ current_max = int(field[4])
+ if field[6] == '':
+ current_inactive = -1
+ else:
+ current_inactive = int(field[6])
if name in no_aging_list:
_interactive and log(_('User %s in password aging exception list') % (name,))
continue
@@ -1236,39 +1239,21 @@ def password_aging(max, inactive=-1):
error(_('User %s in shadow but not in passwd file') % name)
continue
if (len(password) > 0 and password[0] != '!') and password != '*' and password != 'x' and (entry[2] >= uid_min or entry[2] == 0):
- cmd = 'LC_ALL=C /usr/bin/chage -l %s' % entry[0]
- ret = commands.getstatusoutput(cmd)
- _interactive and log(_('got current maximum password aging for user %s with command \'%s\'') % (entry[0], cmd))
- if ret[0] == 0:
- res = maximum_regex.search(ret[1])
- res2 = inactive_regex.search(ret[1])
- if res and res2:
- current_max = int(res.group(1))
- if res2.group(2) == 'never':
- current_inactive = -1
- else:
- current_inactive = int(res2.group(2))
- new_max = max
- new_inactive = inactive
- # don't lower security when not changing security level
- if same_level():
- if current_max < max and current_inactive < inactive:
- continue
- if current_max < max:
- new_max = current_max
- if current_inactive < inactive:
- new_inactive = current_inactive
- if new_max != current_max or current_inactive != new_inactive:
- cmd = 'LC_ALL=C /usr/bin/chage -M %d -I %d -d %s %s' % (new_max, new_inactive, time.strftime('%Y-%m-%d'), entry[0])
- ret = commands.getstatusoutput(cmd)
- log(_('changed maximum password aging for user %s with command %s') % (entry[0], cmd))
- if ret[0] != 0:
- error(ret[1])
- else:
- error(_('unable to parse chage output'))
- else:
- error(_('unable to run chage: %s') % ret[1])
-
+ new_max = max
+ new_inactive = inactive
+ # don't lower security when not changing security level
+ if same_level():
+ if current_max < max and current_inactive < inactive:
+ continue
+ if current_max < max:
+ new_max = current_max
+ if current_inactive < inactive:
+ new_inactive = current_inactive
+ if new_max != current_max or current_inactive != new_inactive:
+ cmd = 'LC_ALL=C /usr/bin/chage -M %d -I %d -d %s \'%s\'' % (new_max, new_inactive, time.strftime('%Y-%m-%d'), entry[0])
+ ret = commands.getstatusoutput(cmd)
+ log(_('changed maximum password aging for user \'%s\' with command %s') % (entry[0], cmd))
+
################################################################################
def allow_xauth_from_root(arg):
div class='add'>+DRIVER2 nvidia-current-wopengpu
+DRIVER2_NEEDS_SSE
+
+# NVidia Hopper cards and beyond
+NAME NVIDIA Architecture (2022): Hopper
+DRIVER modesetting
+DRIVER2 nvidia-current
+DRIVER2_NEEDS_SSE
+
+# NVidia Hopper cards and beyond (OpenGPU kernel modules)
+NAME NVIDIA Architecture (2022): Hopper (OpenGPU)
+DRIVER modesetting
+DRIVER2 nvidia-current-wopengpu
+DRIVER2_NEEDS_SSE
+
+# NVidia Ada Lovelace cards and beyond
+NAME NVIDIA Architecture (2022): Ada Lovelace
+DRIVER modesetting
+DRIVER2 nvidia-current
+DRIVER2_NEEDS_SSE
+
+# NVidia Ada Lovelace cards and beyond (OpenGPU kernel modules)
+NAME NVIDIA Architecture (2022): Ada Lovelace (OpenGPU)
+DRIVER modesetting
+DRIVER2 nvidia-current-wopengpu
+DRIVER2_NEEDS_SSE
+
+# NVidia Blackwell cards and beyond (OpenGPU kernel modules)
+NAME NVIDIA Architecture (2024): Blackwell (OpenGPU)
+DRIVER modesetting
+DRIVER2 nvidia-current-wopengpu
+DRIVER2_NEEDS_SSE
+
+# NVidia Rubin cards and beyond (codename from roadmap)
+NAME NVIDIA Architecture (2026): Rubin (OpenGPU)
+DRIVER modesetting
+DRIVER2 nvidia-current-wopengpu
+DRIVER2_NEEDS_SSE
+
+# NVidia Rubin Ultra cards and beyond (codename from roadmap)
+NAME NVIDIA Architecture (2027): Rubin Ultra (OpenGPU)
+DRIVER modesetting
+DRIVER2 nvidia-current-wopengpu
+DRIVER2_NEEDS_SSE
+
+# NVidia Feynman cards and beyond (codename from roadmap)
+NAME NVIDIA Architecture (2028): Feynman (OpenGPU)
+DRIVER modesetting
+DRIVER2 nvidia-current-wopengpu
+DRIVER2_NEEDS_SSE
+
+# latest driver (as shown in https://forums.developer.nvidia.com/t/current-graphics-driver-releases/28500/)
+# nvidia-newfeature branch
+NAME NVIDIA Driver: New Feature Branch
+DRIVER modesetting
+DRIVER2 nvidia-newfeature
+DRIVER2_NEEDS_SSE
+
+# latest driver (as shown in https://forums.developer.nvidia.com/t/current-graphics-driver-releases/28500/)
+# nvidia-newfeature branch
+NAME NVIDIA Driver: New Feature Branch (OpenGPU)
+DRIVER modesetting
+DRIVER2 nvidia-newfeature-wopengpu
+DRIVER2_NEEDS_SSE
+
+# duplicate nvidia470 entry for straight configuration (already in GeForce 635 to GeForce 920)
+NAME NVIDIA Driver: Latest Legacy (alias of GeForce 635 to 920)
+DRIVER modesetting
+DRIVER2 nvidia470
+DRIVER2_NEEDS_SSE
+
+# duplicate nvidia-current entry (already in GeForce 745 and later)
+NAME NVIDIA Driver: Production Branch
+DRIVER modesetting
+DRIVER2 nvidia-current
+DRIVER2_NEEDS_SSE
+
+# duplicate nvidia-current entry (already in GeForce 745 and later)
+NAME NVIDIA Driver: Production Branch (OpenGPU)
+DRIVER modesetting
+DRIVER2 nvidia-current-wopengpu
+DRIVER2_NEEDS_SSE
+
NAME NVIDIA GeForce3 (xbox)
DRIVER nvxbox
LINE Option "UseFBDev" "1"
LINE Option "HWCursor" "0"
-# IMS
+# duplicate modesetting as aid for NVidia cards (to be choosen manually instead of nouveau)
+NAME NVIDIA Kernel Mode setting (Xorg modesetting)
+DRIVER modesetting
+
+# duplicate nouveau as aid for NVidia cards (to be choosen straightly)
+NAME NVIDIA Nouveau (alias of Xorg free nouveau driver)
+DRIVER nouveau
NAME IMS TwinTurbo-based cards
DRIVER vesa
@@ -316,15 +462,18 @@ DRIVER vesa
# 3DLabs
NAME 3Dlabs Glint / Permedia-based cards
-DRIVER glint
+#DRIVER glint
+DRIVER fbdev
NAME 3Dlabs Glint / Permedia-based cards (software cursor)
LINE Option "SWcursor"
-DRIVER glint
+#DRIVER glint
+DRIVER fbdev
NAME Diamond Fire GL 3000
LINE Option "SWcursor"
-DRIVER glint
+#DRIVER glint
+DRIVER fbdev
LINE Option "FireGL3000" "true"
# Alliance Semiconductor
@@ -371,16 +520,19 @@ LINE Option "sw_cursor"
NAME Digital 8-plane TGA (Generic)
CHIPSET TGA
-DRIVER tga
+#DRIVER tga
+DRIVER fbdev
NAME Digital 8-plane TGA (Bt485-based)
CHIPSET TGA
-DRIVER tga
+#DRIVER tga
+DRIVER fbdev
LINE Ramdac "Bt485"
NAME Digital 24-plane TGA
CHIPSET TGA
-DRIVER tga
+#DRIVER tga
+DRIVER fbdev
LINE Ramdac "Bt463"
# Rendition
@@ -403,6 +555,18 @@ NAME Intel 810 and later
DRIVER intel
DRI_GLX
+NAME Intel 810 and later (soft3D)
+DRIVER intel
+DRI_GLX
+LINE Option "NoAccel" "true"
+
+NAME Intel Kernel Mode setting (Xorg modesetting)
+DRIVER modesetting
+
+NAME Intel Kernel Mode setting (Xorg modesetting soft3D)
+DRIVER modesetting
+LINE Option "AccelMethod" "none"
+
NAME Intel Vermilion-based cards
DRIVER vesa
@@ -437,6 +601,7 @@ NAME Sun GX-based cards
DRIVER suncg6
NAME Sun SX-based cards
+# broken
DRIVER suncg14
NAME Sun ZX-based cards
@@ -455,7 +620,7 @@ DRIVER qxl
# VMware virtual video cards
NAME VMware virtual video card
-DRIVER vmware
+DRIVER modesetting
# Virtio virtual video cards
diff --git a/lst/Makefile b/lst/Makefile
index 1281f21c..1edf4954 100644
--- a/lst/Makefile
+++ b/lst/Makefile
@@ -14,7 +14,7 @@ TMP_TABLES = $(TABLES:%=%.tmp)
build: preferred-modules.alias
-update-ids: new-usb-ids new-pci-ids new-oui-txt
+update-ids: new-usb-ids new-pci-ids new-oui-txt new-pnp-csv
clean:
rm -f *~ *.tmp ScannerDB.gz preferred-modules.alias fallback-modules.alias
@@ -50,10 +50,21 @@ new-usb-ids:
@curl --compressed -O http://www.linux-usb.org/usb.ids
new-pci-ids:
- @curl --compressed -O http://pciids.sourceforge.net/pci.ids
+ @curl --compressed -O https://pci-ids.ucw.cz/v2.2/pci.ids
new-oui-txt:
- @curl --compressed -O http://standards.ieee.org/develop/regauth/oui/oui.txt
+ @curl --compressed -O https://standards-oui.ieee.org/oui/oui.txt
+ # Fix DOS EOL.
+ @sed -E -e 's/\r//g;s/\s+$$//g' -i oui.txt
+
+new-pnp-csv:
+ @curl --compressed -o pnp.ids.csv https://uefi.org/uefi-pnp-export
+ # Remove header, replace csv separator "," with "|", and remove quotes.
+ @sed -e 1d -Ee :1 -e 's/^(([^",]|"[^"]*")*),/\1|/;t1' -e 's/\"//g' -i pnp.ids.csv
+ # Swap columns 1 and 2, and delete the 3rd (date). Sort by IDs and save to pnp.ids.
+ @awk -F'|' '{ x = $$1; $$1 = $$2; $$2 = x; print $$1"\t"$$2; }' pnp.ids.csv | sort > pnp.ids
+ # Delete the csv file.
+ @rm -f pnp.ids.csv
install: $(TMP_TABLES) $(TABLES3)
for i in $(TABLES); do \
diff --git a/lst/oui.txt b/lst/oui.txt
index 4126c6b5..d9276a26 100644
--- a/lst/oui.txt
+++ b/lst/oui.txt