Re: [Un peu HS] Truc bizarre avec des sockets Linux

2023-11-23 Thread BERTRAND Joël
Désolé, j'ai oublié le code serveur.

JB
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define PORT 

int main(){

	int sockfd, ret;
	 struct sockaddr_in serverAddr;

	int newSocket;
	struct sockaddr_in newAddr;

	socklen_t addr_size;

	char buffer[1024];
	pid_t childpid;

	sockfd = socket(AF_INET, SOCK_STREAM, 0);
	if(sockfd < 0){
		printf("[-]Error in connection.\n");
		exit(1);
	}
	printf("[+]Server Socket is created.\n");

	memset(, '\0', sizeof(serverAddr));
	serverAddr.sin_family = AF_INET;
	serverAddr.sin_port = htons(PORT);
	serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1");

	ret = bind(sockfd, (struct sockaddr*), sizeof(serverAddr));
	if(ret < 0){
		printf("[-]Error in binding.\n");
		exit(1);
	}
	printf("[+]Bind to port %d\n", );

	if(listen(sockfd, 10) == 0){
		printf("[+]Listening\n");
	}else{
		printf("[-]Error in binding.\n");
	}


	while(1){
		newSocket = accept(sockfd, (struct sockaddr*), _size);
		if(newSocket < 0){
			exit(1);
		}
		printf("accept(%d, %d)\n", sockfd, newSocket);
		printf("Connection accepted from %s:%d\n", inet_ntoa(newAddr.sin_addr), ntohs(newAddr.sin_port));

		if((childpid = fork()) == 0){
			close(sockfd);

			while(1){
recv(newSocket, buffer, 1024, 0);
if(strcmp(buffer, ":exit") == 0){
	printf("Disconnected from %s:%d\n", inet_ntoa(newAddr.sin_addr), ntohs(newAddr.sin_port));
	printf("shutdown: %d\n", shutdown(newSocket, SHUT_RDWR));
	printf("close: %d\n", close(newSocket));
	break;
}else{
	printf("Client: %s\n", buffer);
	send(newSocket, buffer, strlen(buffer), 0);
	bzero(buffer, sizeof(buffer));
}
			}
		}

	}

	close(newSocket);


	return 0;
}


signature.asc
Description: OpenPGP digital signature


Re: [Un peu HS] Truc bizarre avec des sockets Linux

2023-11-23 Thread BERTRAND Joël
Je viens de reproduire la chose avec deux bouts de programmes écrits en
C (voir les deux pièces jointes).

hilbert:[~/rpl-test] > ./server
[+]Server Socket is created.
[+]Bind to port 
[+]Listening
accept(3, 4)
Connection accepted from 127.0.0.1:43388
Client: aze
Disconnected from 127.0.0.1:43388
shutdown: 0
close: 0
accept(3, 6)
Connection accepted from 127.0.0.1:49504
Client: aze
Disconnected from 127.0.0.1:49504
shutdown: 0
close: 0

hilbert:[~/rpl-test] > ./client
[+]Client Socket is created.
[+]Connected to Server.
Client: aze
Server: aze
Client: :exit
[-]Disconnected from server.
hilbert:[~/rpl-test] > ./client
[+]Client Socket is created.
[+]Connected to Server.
Client: aze
Server: aze
Client: :exit
[-]Disconnected from server.

Un coup de valgrind montre exactement la même chose lorsque le
processus serveur racine est tué par un SIGINT :

==10415== Process terminating with default action of signal 2 (SIGINT)
==10415==at 0x49A04D0: accept (accept.c:26)
==10415==by 0x109233: main (tcpServer.c:52)
==10415==
==10415== FILE DESCRIPTORS: 7 open (3 std) at exit.
==10415== Open AF_INET socket 6: 127.0.0.1: <-> 127.0.0.1:57256
==10415==at 0x49A04D0: accept (accept.c:26)
==10415==by 0x109233: main (tcpServer.c:52)
==10415==
==10415== Open AF_INET socket 4: 127.0.0.1: <-> 127.0.0.1:46402
==10415==at 0x49A04D0: accept (accept.c:26)
==10415==by 0x109233: main (tcpServer.c:52)
==10415==
==10415== Open AF_INET socket 3: 127.0.0.1: <-> unbound
==10415==at 0x49A0BA7: socket (syscall-template.S:120)
==10415==by 0x109141: main (tcpServer.c:25)
==10415==
==10415== Open file descriptor 5:
==10415==

Les sockets créées par accept() [ici fd=4 et fd=6] restent ouvertes dans
le processus racine du serveur et au bout d'un certain nombre de
connexions (dépendant de la valeur max open files), accept() retourne
une erreur.

À noter : la socket est bien fermée dans le processus créé par fork()
[shutdown + close] et est fermée dans le client.

Merci de vos lumières,

JB
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define PORT 

int main(){

	int clientSocket, ret;
	struct sockaddr_in serverAddr;
	char buffer[1024];

	clientSocket = socket(AF_INET, SOCK_STREAM, 0);
	if(clientSocket < 0){
		printf("[-]Error in connection.\n");
		exit(1);
	}
	printf("[+]Client Socket is created.\n");

	memset(, '\0', sizeof(serverAddr));
	serverAddr.sin_family = AF_INET;
	serverAddr.sin_port = htons(PORT);
	serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1");

	ret = connect(clientSocket, (struct sockaddr*), sizeof(serverAddr));
	if(ret < 0){
		printf("[-]Error in connection.\n");
		exit(1);
	}
	printf("[+]Connected to Server.\n");

	while(1){
		printf("Client: \t");
		scanf("%s", [0]);
		send(clientSocket, buffer, strlen(buffer), 0);

		if(strcmp(buffer, ":exit") == 0){
			printf("shutdown: %d\n", shutdown(clientSocket, SHUT_RDWR));
			printf("close: %d\n", close(clientSocket));
			printf("[-]Disconnected from server.\n");
			exit(1);
		}

		if(recv(clientSocket, buffer, 1024, 0) < 0){
			printf("[-]Error in receiving data.\n");
		}else{
			printf("Server: \t%s\n", buffer);
		}
	}

	return 0;
}


signature.asc
Description: OpenPGP digital signature


Re: quick alpine config question?

2023-11-23 Thread Tim Woodall

On Thu, 23 Nov 2023, Karen Lewellen wrote:


Hi folks,
We have a member of the greater Toronto Linux Users group, who rather enjoys 
setting up email accounts,hosting allot of them personally.
He is new to alpine though, our test of roundcube was almost, but not quite 
successful due to sloppy JavaScript coding on the send button.
where he is stuck at the moment is how to get alpine to display imap things 
like the sent mail folder int he folders list.
Dreamhost is having the same problem with some of our new office email 
accounts.
is there a specific imap server config file, or a choice from the main 
settings s, config c options?
Also, what about the imap aspect of certificates? I recall there is a new way 
to create the aph thing google requires.

Thanks for ideas.
Kare




Are you using mbox or Maildir? And is inbox in /home or /var/spool/mail?

I have this working with dovecot. Maildir with INBOX in /home.

I'll look up the config but it will probably be Saturday. I vaguely
recall having ti tweak something in the dovecot configs.

Tim.



quick alpine config question?

2023-11-23 Thread Karen Lewellen

Hi folks,
We have a member of the greater Toronto Linux Users group, who rather 
enjoys setting up email accounts,hosting allot of them personally.
He is new to alpine though, our test of roundcube was almost, but not 
quite successful due to sloppy JavaScript coding on the send button.
where he is stuck at the moment is how to get alpine to display imap 
things like the sent mail folder int he folders list.
Dreamhost is having the same problem with some of our new office email 
accounts.
is there a specific imap server config file, or a choice from the main 
settings s, config c options?
Also, what about the imap aspect of certificates? I recall there is a new 
way to create the aph thing google requires.

Thanks for ideas.
Kare




Re: Boot fails to load network or USB, piix4_smbus - SMBus Host Controller, after update to dbus (1.14.10-3) unstable

2023-11-23 Thread Tim Woodall

On Thu, 23 Nov 2023, Andy Dorman wrote:

I have not yet figured out how to fix our two broken servers since we can't 
boot them to update them.  Since we have several identical running servers 
and can mount and manipulate the file system of the dead servers, is it 
possible to just copy a good initrd.img-6.5.0-4-amd64 to the dead server 
/boot directory and boot to that image? That sounds way too simple to me.




I'm pretty sure you can bind mount /proc, /sys, /dev, /run, chroot and
then update-initramfs to regen.




Keyboard doesn't make the machine up any more

2023-11-23 Thread Stefan Monnier
Since the last reboot, my desktop doesn't want to listen to my keyboard
any more while sleeping: I can wake it up by pressing the power button
on the actual computer case, but not by pressing a keyboard key.

This has worked fine for several years and I can't remember making any
related change to the machine's config (not sure when was the last time
it was rebooted, so it's possible it was still running an older kernel
from the previous Debian stable).

The machine runs Debian stable.  I checked

grep . /sys/bus/usb/devices/*/product

and

grep . /sys/bus/usb/devices/*/power/wakeup

to confirm that the keyboard is marked as "wakeup=enabled", so the
problem apparently comes from elsewhere.  To be double sure, I did:

for f in /sys/bus/usb/devices/*/power/wakeup; do echo enabled >"$f"; done

and it made no difference.

The keybord is connected via a small unpowered USB hub, so I also tried
to connect the keyboard directly but that did not help either, so the
problem isn't linked to the use of a USB hub.

Here's some further info:

# uname -a
Linux pastel 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 
(2023-09-29) x86_64 GNU/Linux
# cat /proc/acpi/wakeup 
Device  S-state   Status   Sysfs node
UAR1  S4*disabled  pnp:00:06
PS2K  S4*disabled
RP01  S4*disabled  pci::00:1c.0
PXSX  S4*disabled
RP02  S4*disabled
PXSX  S4*disabled
RP03  S4*disabled  pci::00:1c.2
PXSX  S4*enabled   pci::03:00.0
RP04  S4*disabled  pci::00:1c.3
PXSX  S4*disabled  pci::04:00.0
RP05  S4*disabled
PXSX  S4*disabled
RP06  S4*disabled
PXSX  S4*disabled
RP07  S4*disabled
PXSX  S4*disabled
RP08  S4*disabled
PXSX  S4*disabled
GLAN  S4*disabled
EHC1  S4*enabled   pci::00:1d.0
EHC2  S4*enabled   pci::00:1a.0
XHC   S4*enabled   pci::00:14.0
HDEF  S4*disabled  pci::00:1b.0
PEG0  S4*disabled  pci::00:01.0
PEGP  S4*disabled
PEG1  S4*disabled
PEG2  S4*disabled
#

I don't really know how to interpret the /proc/acpi/wakeup info but IIUC
it seems to say that wakeup is enabled for EHC1, EHC2, and XHC which
I presume represent the various USB controllers present on the motherboard.

Any idea what might be going on, or what else I could check?


Stefan



Re: Installation d'un paquet pour un groupe d'utilisateur

2023-11-23 Thread didier gaumet

Le 23/11/2023 à 16:04, Alex PADOLY a écrit :

Bonsoir à tous,

Sur un serveur LTSP, comment peut-on faire pour installer un logiciel 
pour un utilisateur ou un groupe d'utilisateur.


Sans certitude, je pense que cela pourrait se faire avec dpkg -i.


Merci pour vos réponses.


Avertissement: je m'y colle parce que personne ne t'a répondu pour 
l'instant mais je n'ai jamais installé de serveur donc ce que je te dis 
est à prendre avec précautions


J'aurais tendance à faire comme suit (peut-être justement parce que je 
ne suis pas familier avec une autre approche qui serait plus appropriée):


soit:

- créer un groupe utilisateur par appli à installer, pour chaque appli 
modifier les utilisateurs appelés à utiliser celle-ci afin de les 
incorporer dans le groupe de l'appli, modifier le groupe du binaire de 
l'appli pour que ce soit le groupe de l'appli, restreindre les droits 
d'exécution du binaire de l'appli exclusivement à l'utilisateur 
propriétaire et au groupe propriétaire à l'exclusion des autres


ou

- gérer ça avec des ACL (j'ai pas creusé)



Re: live-build: erreur sur firmware

2023-11-23 Thread didier gaumet

Le 23/11/2023 à 22:46, didier gaumet a écrit :
[...]

     --archive-areas "main contrib non-free" \

[...]

j'ai fait du copier-coller sans me relire et modifier.
il faut donc lire plutôt:

  --archive-areas "main contrib non-free non-free-firmware" \





Re: live-build: erreur sur firmware

2023-11-23 Thread didier gaumet

De ce que je comprends d'après un tuto sur debian-facile:
(cf https://debian-facile.org/doc:install:live-build )

1) il faut spécifier les options:
lb config noauto \
[...]
--archive-areas "main contrib non-free" \
[...]
--firmware-binary "true" \
--firmware-chroot "true" \
[...]

2) il faut aussi insérer chaque paquet de firmware à installer dans la 
liste des paquets à installer. tu peux alléger un peu la liste en 
spécifiant l'un des métapaquets disponibles:

live-task-non-free-firmware-pc
live-task-non-free-firmware-server

ne m'en demande pas plus, je n'ai jamais expérimenté tout ça :-)



Re: Boot fails to load network or USB, piix4_smbus - SMBus Host Controller, after update to dbus (1.14.10-3) unstable

2023-11-23 Thread Jeffrey Walton
On Thu, Nov 23, 2023 at 4:09 PM Andy Dorman  wrote:
>
> I have continued to research this and I think I found the problem.
>
> I also think the dbus update timing mentioned in the subject is entirely
> coincidental. I hope I haven't caused any unnecessary excitement or work
> for anyone in the dbus package team. My apologies if I did.
>
> A few months back we ran into a package conflict with the
> initramfs-tools that we have used since the beginning. I believe the
> conflict was with systemd, but I could be mis-rememberiung that.  We
> were able to switch to tiny-initramfs which did the same job (we
> thought) and didn't have a conflict.
>
> Since that switch and before our recent problems, we rebooted one server
> which just happened to be different from all our others in that it hever
> had the initramfs package conflict and was still running the original
> initramfs package.
>
> On a hunch (since I really have no clue about how debian boot actually
> works) I compared initram image file sizes and used lsinitramfs to list
> the content of the initram images built with tiny-initramfs and the
> standard initramsfs. The results:
>
> - the tiny-initramfs image file size was under 1MB and lsinitramfs
> listed a very few modules to be loaded and specifcally NOT the
> piix4_smbus driver
>
> - the standard intramfs image file was ~ 34MB and included the missing
> > usr/lib/modules/6.5.0-4-amd64/kernel/drivers/i2c/busses/i2c-piix4.ko
>
> So based on my very sketchy knowledge of Debeian boot and what I am
> seeing on our working servers, I think the problem is with
> tiny-initramfs not including the needed kernel driver modules in the
> image file OR our not understanding how to correctly use tiny-initramfs.
>
> The fix as far as we are concerned with our servers that are running has
> been to switch back to the standard initramfs package (the previous
> conflict is gone now thank goodness) and rebuild the initram images,
> which we have done.
>
> I have not yet figured out how to fix our two broken servers since we
> can't boot them to update them.  Since we have several identical running
> servers and can mount and manipulate the file system of the dead
> servers, is it possible to just copy a good initrd.img-6.5.0-4-amd64 to
> the dead server /boot directory and boot to that image? That sounds way
> too simple to me.

According to 
,
you cannot copy initrd.img from one machine to another.

Maybe you can boot to a live CD, and then regenerate initrd.img for the machine?

Jeff



Re: Boot fails to load network or USB, piix4_smbus - SMBus Host Controller, after update to dbus (1.14.10-3) unstable

2023-11-23 Thread Andy Dorman

I have continued to research this and I think I found the problem.

I also think the dbus update timing mentioned in the subject is entirely 
coincidental. I hope I haven't caused any unnecessary excitement or work 
for anyone in the dbus package team. My apologies if I did.


A few months back we ran into a package conflict with the 
initramfs-tools that we have used since the beginning. I believe the 
conflict was with systemd, but I could be mis-rememberiung that.  We 
were able to switch to tiny-initramfs which did the same job (we 
thought) and didn't have a conflict.


Since that switch and before our recent problems, we rebooted one server 
which just happened to be different from all our others in that it hever 
had the initramfs package conflict and was still running the original 
initramfs package.


On a hunch (since I really have no clue about how debian boot actually 
works) I compared initram image file sizes and used lsinitramfs to list 
the content of the initram images built with tiny-initramfs and the 
standard initramsfs. The results:


- the tiny-initramfs image file size was under 1MB and lsinitramfs 
listed a very few modules to be loaded and specifcally NOT the 
piix4_smbus driver


- the standard intramfs image file was ~ 34MB and included the missing

usr/lib/modules/6.5.0-4-amd64/kernel/drivers/i2c/busses/i2c-piix4.ko


So based on my very sketchy knowledge of Debeian boot and what I am 
seeing on our working servers, I think the problem is with 
tiny-initramfs not including the needed kernel driver modules in the 
image file OR our not understanding how to correctly use tiny-initramfs.


The fix as far as we are concerned with our servers that are running has 
been to switch back to the standard initramfs package (the previous 
conflict is gone now thank goodness) and rebuild the initram images, 
which we have done.


I have not yet figured out how to fix our two broken servers since we 
can't boot them to update them.  Since we have several identical running 
servers and can mount and manipulate the file system of the dead 
servers, is it possible to just copy a good initrd.img-6.5.0-4-amd64 to 
the dead server /boot directory and boot to that image? That sounds way 
too simple to me.


--
Andy Dorman
Ironic Design, Inc.
AnteSpam.com



Crear /home/$USER a un servidor NFS4 amb el primer inici de sessió (autofs).

2023-11-23 Thread Lluís Gras
Bones,

Durant uns quants, bastants anys, he tingut un directori d'usuaris
Openldap, gestionat amb ldap-account-manager pels usuaris de l'escola i
donat que per "sort" o per desgràcia, utilitzem el Google Workspace, amb
l'ànim d'unificar contrasenyes i simplificar la meva existència, he
configurat un nou servidor virtualitzat que autentica els usuaris contra
l'LDAP de Google ... i funciona, però m'agradaria que els espais d'usuari
es creessin automàticament al servidor, durant el primer intent d'inici de
sessió en els equips remots. He vist que coses com oddjob o
oddjob-mkhomedir potser em podrien servir però no tinc clar com fer-ho i de
moment he optat per activar el mòdul pam mkhomedir i crear els espais
d'usuari executant al servidor un guió com

#!/bin/sh
#Recupero els usuaris que no son de sistema
for i in `getent passwd -s sss | cut -d: -f1`; do echo "Creant, al
accedir-hi, el /home de l'usuari: $i"; su --pty - $i -c exit; done

Que ja em serveix, però ho veig propens a oblits i m'agradaria oblidar-me
de crear espais d'usuari a ma i preferiria que aquests es creessin
"automàgicament". Es possible? Com?

Si em podeu ajudar, us ho agrairé ;-)


Re: rdiff-backup-2.2.2-1 old/new interface - solved, thx

2023-11-23 Thread Greg

On 11/23/23 18:18, Curt wrote:

On 2023-11-21, Greg  wrote:

Hi there,

I'm using following command to backup:

rdiff-backup backup /home/ 'orfeusz::/mnt/backup/home'

and get the following:

WARNING: this command line interface is deprecated and will disappear,
start using the new one as described with '--new --help'.

Unfortunately I'm unable to translate to the new interface.
Any suggestions?



30. Why does rdiff-backup complain about command line interface being
 deprecated even though I’m using the new syntax?

  Calling for example rdiff-backup backup loc1 server2::loc2 leads to a message
  WARNING: this command line interface is deprecated and will disappear, start
  using the new one as described with '--new --help'.

  You must be using a remote location in your call, as in our example. In order
  to make sure that the other side understands the call, rdiff-backup uses the
  CLI form fitting the default API version. For example, at time of writing,
  rdiff-backup 2.2 uses API 200 by default and hence calls rdiff-backup --server
  so that the CLI can be understood by rdiff-backup 2.0. If the server side is
  v2.2+, then the warning message will appear.

  Call rdiff-backup with the higher API and the message will disappear.

  Calling for example rdiff-backup --api-version 201 backup loc1 server2::loc2
  will make sure that rdiff-backup server is being called, getting rid of the
  warning message.

https://rdiff-backup.net/FAQ.html







Re: live-build: erreur sur firmware

2023-11-23 Thread Pierre ESTREm

Bonsoir,

Dommage, aucune des deux lignes passent (même retour) :

  --archive-areas main contrib non-free non-free-firmware \
ou
  --archive-areas main contrib non-free-firmware \

Je vais m'appuyer sur la commande que vous citez "apt show" pour 
d'autres tentatives.


Merci !

pierre estrem



Le 23/11/2023 à 08:59, didier gaumet a écrit :

Le 23/11/2023 à 03:23, Pierre ESTREm a écrit :
[...]

E: Package 'firmware-linux' has no installation candidate

[...]

 --archive-areas main contrib non-free \

[...]

Bonjour,

didier@hp-notebook14:~$ apt show firmware-linux
[...]
Section: non-free-firmware/metapackages
[...]

je pense que la ligne suivante serait correcte pour ton emploi:

  --archive-areas main contrib non-free non-free-firmware \

ou simplement

  --archive-areas main contrib non-free-firmware \

si seuls les firmwares t'intéressent parmi les logiciels propriétaires





Re: Modify user PATH in GNOME in Debian 12

2023-11-23 Thread gene heskett

On 11/23/23 09:18, Greg Wooledge wrote:

On Thu, Nov 23, 2023 at 05:43:18AM -0500, gene heskett wrote:

I'm user 1000 and have had the expected results by putting a modified path
in my .profile but it is not automatic, I have to . .profile for every
terminal I start. I have 2 non-stock dirs in my /home/me path, bin and
AppImages, and I put them ahead of the rest of the default path. Now if
someone would tell me how to make that automatic I'd be delighted.


There's nothing that will work in *all* setups.  You have to do what
works for *your* setup.

Last I heard, you use a third-party desktop environment (Trinity or
something like that), and from your context above it looks like you use a
GUI Display Manager to login.  I also believe you're using an X session
(not Wayland) and I'm guessing that your DE is normal, not GNOME-like,
in its terminal spawning.

For this setup, I'd go with the ~/.xsessionrc file.  Create the
file /home/gene/.xsessionrc and put this in it:

 PATH=$HOME/bin:$HOME/AppImages:$PATH
 GENETEST=hello
 export PATH GENETEST

Then on your next login, see whether you have the correct PATH, and
whether you have the GENETEST variable in your environment (this is just a
debugging aid, to be sure the file was used).  If all works as expected,
you can get rid of the GENETEST variable later.  It shouldn't hurt
anything, just uses a few extra bytes of memory, so it's a low priority.

If you don't get the GENETEST variable in any program's environment,
then your OS isn't Debian enough (or your DE clears it out, or your
terminals are spawned in a GNOME-like manner...), and you'll have to
find a different solution.


Got it, thanks Greg


.


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



[Un peu HS] Truc bizarre avec des sockets Linux

2023-11-23 Thread BERTRAND Joël
Bonjour à tous,

Je développe le logiciel suivant http://www.rpl2.fr et un utilisateur
du bout du monde vient de me remonter un bug bizarre sur la gestion des
sockets réseau TCP. Je viens de passer la journée dessus et je ne
comprends pas.

Je précise que la fonction a été méchamment testée et qu'il me semble
qu'elle fonctionnait parfaitement lorsqu'elle a été publiée il y a de
cela plusieurs années.

La séquence de commandes C effectuée est la suivante :
- création d'une socket avec socket() et bind() ;
- attente d'une connexion entrante avec accept() ;
- fork() et traitement du client dans le processus fils (y compris la
libération de la socket créée par accept()).

C'est ni plus ni moins que ceci (fonction serve_forever()):
https://gist.github.com/laobubu/d6d0e9beb934b60b2e552c2d03e1409e#file-httpd-c

Dans le langage en question, ça se traduit comme ceci :

SERVEUR
<<
// Création d'une socket TCP écoutant
// sur le port 87 avec un maximum de 16
// sockets clientes.

{
"local" "stream" "flow"
{ "protocol" "ipv4" }
{ "listen" 16 }
{ "port" 87 }
{ "option" "reuse address" }
} open

// Format binaire
{ "length*(*)" } swap format
-> SOCKET
<<
do
   // On attend une connexion
SOCKET wfsock

// Si connexion, on lance un
// traitement dans un processus
// fils.
'CIRCUIT_CONNECTE' detach
// On efface le PID de la pile
drop
// On efface les deux sockets de la pile
drop2
until
false
end
 >>
>>

CIRCUIT_CONNECTE
<<
"Socket connectée" disp
   'SOCKET' sto
   'FERMETURE_SOCKET' atexit

   do
  SOCKET "POLLIN" 2 ->list 1 ->list TIMEOUT_CONNEXION poll
  ...
   until
  ...
   end
>>

FERMETURE_SOCKET
<<
SOCKET close
>>

Si je remplace 'detach' (fork()) par 'spawn' (thread_create()), ça
fonctionne parfaitement bien. Ça peut tourner des heures (j'ai laissé le
processus fonctionner durant plusieurs heures, ce qui correspond à
plusieurs centaines de milliers de connexion sur la socket). Avec
'detach', le programme finit par planter faute de descripteur de socket
disponible (trop de fichiers ouverts).

Je viens de passer le code dans valgrind et je ne comprends pas bien :

Root rayleigh:[~/exemple] > valgrind --track-fds=yes ./connecteur.rpl

+++RPL/2 (R) version 4.1.35 (Jeudi 23/11/2023, 16:42:36 CET)
+++Copyright (C) 1989 à 2022, 2023 BERTRAND Joël
...
socket: 7 <- renvoyée par accept() dans WFSOCK (la socket créée par
socket est la 6)
Socket connectée
close 7 <- fermeture de la socket 7 (par un shutdown() puis close())
close 7 OK
...
socket: 9
Socket connectée
close 9
close 9 OK
==20196== FILE DESCRIPTORS: 7 open (3 std) at exit.
==20196== Open AF_INET socket 7: 127.0.0.1:87 <-> unbound
==20196==at 0x546950F: accept (accept.c:26)
==20196==by 0x5C0661: librpl_instruction_wfsock
(instructions_w1-conv.c:3410)
==20196==by 0x4CC36D: librpl_analyse (analyse-conv.c:1076)
==20196==by 0x4D9C58: librpl_evaluation (evaluation-conv.c:764)
==20196==by 0x5CF16D: librpl_sequenceur_optimise
(optimisation-conv.c:399)
==20196==by 0x5D5A46: librpl_rplinit (rpl-conv.c:5198)
==20196==by 0x466F9D: main (init-conv.c:29)
...

Comment se fait-il que la socket soit toujours ouverte dans le père
(elle a été explicitement fermée dans le processus fils) ? Les
ressources système ne sont pas libérées. Pire, chaque socket cliente
reste ouverte pour le système et le processus parent.

Je résous une partie du problème en rajoutant un close de la socket
cliente après un timeout dans le processus serveur (mais ce n'est pas
satisfaisant).

Je constate aussi que si je ferme dans le processus fils la socket
initiale (celle créée par socket()), accept() râle. Le processus fils
peut donc fermer la socket en attente sur accept() mais s'il ferme la
socket() renvoyée par accept(), il ne la ferme que pour lui-même (et pas
pour le processus père).

La question est donc : suis-je passé à côté de quelque chose ?

J'en reviens donc à ce bout de code :
https://gist.github.com/laobubu/d6d0e9beb934b60b2e552c2d03e1409e#file-httpd-c

Sauf erreur de ma part, dans la fonction serve_forever(), je trouve
bien un accept(), mais jamais de close() sur la socket créée par
accept() (plus exactement, je trouve le close dans le processus détaché
par fork()). Comment ce bout de code peut-il fonctionner sans qu'il ne
finisse par planter par un dépassement du nombre de fichiers ouverts ?

Merci de votre attention,

JB

PS: j'essaie de compiler sur un NetBSD, mais j'ai un problème de
symboles entre ncurses et readline :

ltiple definition of `UP';
../tools/readline-8.2/libreadline.a(terminal.o):(.bss+0xa8): first
defined here
/usr/bin/ld:

Re: Modify user PATH in GNOME in Debian 12

2023-11-23 Thread Greg Wooledge
On Thu, Nov 23, 2023 at 10:52:25PM +0700, Max Nikulin wrote:
> On 23/11/2023 21:02, Greg Wooledge wrote:
> > Usually, creating ~/.xsessionrc (on Debian only, as it's specific to
> > Debian) will suffice for this, as it gets read in by the X session
> > before it spawns your window manager, and then the WM spawns everything
> > else, all with your desired environment.  (Again, assuming X, not Wayland.)
> 
> I would verify that changes are reflected in
> 
> systemctl --user show-environment
> 
> output. XDG autostart instances, applications activated through D-Bus may be
> spawned by systemd user session, not X session & window manager.

Well, the important thing here is knowing what's spawned by whom, in
your particular setup.

In a traditional window manager setup like I use, *nothing* is spawned
by dbus or by the systemd --user manager.  (Well, maybe not nothing.
Maybe pulseaudio or whatever does audio now?  I have no idea how that
stuff works.  I just login, check whether audio works, and if it does,
I *do not touch it*.)

If you've got things that are actually spawned by systemd --user, then
this may be relevant for you.  For me, it's not.  Nothing that I put
in any of the files mentioned in environment.d(5) has EVER become
part of my environment upon login.  I've been down all of these roads
before, you see.

For me, all of the environment.d(5) stuff goes into the systemd --user
service manager which spawns... nothing that's visible to me.  Nothing
at all.

All of my visible applications (terminals, web browsers, etc.) are
spawned by my window manager, which is spawned by my X session, which
is spawned by startx, which is spawned by my console login shell, when
I type the "startx" command.

So, for *me*, configuring the environment in my login shell's dot files
works.

> Greg, do you have ideas how to relieve pain with environment configuration?
> E.g. to not override pam_environment by PATH hardcoded in /etc/profile, to
> negotiate what files display managers should read, etc.

Didn't I just post a long message about this?

People have been searching for this holy grail for DECADES.  It does not
exist.



Re: rdiff-backup-2.2.2-1 old/new interface

2023-11-23 Thread Curt
On 2023-11-21, Greg  wrote:
> Hi there,
>
> I'm using following command to backup:
>
> rdiff-backup backup /home/ 'orfeusz::/mnt/backup/home'
>
> and get the following:
>
> WARNING: this command line interface is deprecated and will disappear, 
> start using the new one as described with '--new --help'.
>
> Unfortunately I'm unable to translate to the new interface.
> Any suggestions?
>
> Regards
> Greg
>
>



30. Why does rdiff-backup complain about command line interface being
deprecated even though I’m using the new syntax?

 Calling for example rdiff-backup backup loc1 server2::loc2 leads to a message
 WARNING: this command line interface is deprecated and will disappear, start
 using the new one as described with '--new --help'.

 You must be using a remote location in your call, as in our example. In order
 to make sure that the other side understands the call, rdiff-backup uses the
 CLI form fitting the default API version. For example, at time of writing,
 rdiff-backup 2.2 uses API 200 by default and hence calls rdiff-backup --server
 so that the CLI can be understood by rdiff-backup 2.0. If the server side is
 v2.2+, then the warning message will appear.

 Call rdiff-backup with the higher API and the message will disappear.

 Calling for example rdiff-backup --api-version 201 backup loc1 server2::loc2
 will make sure that rdiff-backup server is being called, getting rid of the
 warning message.

https://rdiff-backup.net/FAQ.html





Re: Trousseau de clefs

2023-11-23 Thread didier gaumet

Le 23/11/2023 à 17:36, Yannick a écrit :

Le 23/11/2023 à 17:12, didier gaumet a écrit :


Sinon tu peux vérifier avec seahorse (installe le paquet si besoin) ce 
qui est enregistré dans gnome-keyring



Re,

J'ai essayé Seahorse et il m'a lui aussi demandé le mot de passe du 
trousseau. J'ai essayé celui de la session et cela a marché (j'ai lu un 
peu de littérature à ce sujet); donc problème résolu mais un peu 
surprenant d'avoir mis le code session pour cela, Je ne suis pas très 
doué. Comment je peux le modifier pour cet usage exclusif?


Amitiés


En 2 mots vu que j'ai jamais testé, d'après le wiki Archlinux:
https://wiki.archlinux.org/title/GNOME/Keyring
il y a une explication en français sur la manip:
https://help.gnome.org/users/seahorse/stable/keyring-update-password.html



Re: Trousseau de clefs

2023-11-23 Thread Yannick

Le 23/11/2023 à 17:12, didier gaumet a écrit :


Sinon tu peux vérifier avec seahorse (installe le paquet si besoin) ce 
qui est enregistré dans gnome-keyring



Re,

J'ai essayé Seahorse et il m'a lui aussi demandé le mot de passe du 
trousseau. J'ai essayé celui de la session et cela a marché (j'ai lu un 
peu de littérature à ce sujet); donc problème résolu mais un peu 
surprenant d'avoir mis le code session pour cela, Je ne suis pas très 
doué. Comment je peux le modifier pour cet usage exclusif?


Amitiés
--
Yannick VOYEAUD
Nul n'a droit au superflu tant que chacun n'a pas son nécessaire
(Camille JOUFFRAY 1841-1924, maire de Vienne)
http://www.voyeaud.org
Créateur CimGenWeb: http://www.francegenweb.org/cimgenweb/
Journées du Logiciel Libre: http://jdll.org
Généalogie en liberté avec Ancestris https://www.ancestris.org



OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Trousseau de clefs

2023-11-23 Thread didier gaumet

Le 23/11/2023 à 16:52, Yannick a écrit :

Le 23/11/2023 à 16:31, didier gaumet a écrit :

[...]
Il y a des trousseaux de DE (gnome, KDE, etc...) que tu peux (option) 
utiliser. Généralement si tu en utilises un tu utilises celui de ton 
DE (gnome-keyring pour Gnome qui est le DE par défaut sous Debian).


Je n'arrive pas à trouver pour XFCE cette interface de gestion


sous réserve parce que ça fait un bail que j'ai utilisé Xfce 
régulièrement: Xfce n'a pas, je crois, de système propre à ce sujet, il 
doit être prévu d'utiliser en option gnome-keyring en démarrant certains 
services gnome nécessaires à l'ouverture de la session Xfce (tout ça 
étant automatique une fois paramétré)


[...]
Ayant contourné le problème en ressaisissant tout je ne puis reproduire 
et donner le détail quoique mon premier message donne grosso-modo ce que 
j'ai fait:
Au moment de saisir mon n° de CB il me proposait de prendre des données 
déjà enregistrées, je choisis et là mot de passe du trousseau de clef 
que j'ai perdu.


Amitiés


Quel type de données? par exemple ton code à 4 chiffres de carte bleue 
(auquel cas peut-être dans un trousseau genre gnome-keyring)? ou alors 
un mot de pass de connexion au site de ta banque associé à cette carte 
(auquel cas peut-être dans le trousseau Firefox)?


pour le code carte bleue, je ne l'enregistre jamais donc je peux 
difficilement te renseigner


Sinon tu peux vérifier avec seahorse (installe le paquet si besoin) ce 
qui est enregistré dans gnome-keyring




Re: Trousseau de clefs

2023-11-23 Thread Yannick

Le 23/11/2023 à 16:31, didier gaumet a écrit :

Le 23/11/2023 à 16:16, Yannick a écrit :


Bonsoir,

C'est le mot de passe du trousseau de clefs donc à priori Debian
J'ai regardé dans ce que tu m'as conseillé et je n'ai pas trouvé ce 
mot de passe spécifique


Amitiés


Il y a un trousseau Debian (Debian Keyring) utilisé pour les dépôts de 
paquets, je ne pense pas que ce soit ce dont il s'agit.


Re,

Non ce n'est pas cela



Il y a des trousseaux de DE (gnome, KDE, etc...) que tu peux (option) 
utiliser. Généralement si tu en utilises un tu utilises celui de ton DE 
(gnome-keyring pour Gnome qui est le DE par défaut sous Debian).


Je n'arrive pas à trouver pour XFCE cette interface de gestion



Firefox possède son propre trousseau (protégé par mot de passe seulement 
en option) dans lequel sont enregistrés les mots de passe des sites web 
visités dans Firefox (pas d'autres mots de passe là-dedans, hors web ou 
visités avec un autre navigateur).


Oui et ce n'est pas ce que je cherche



Peut-être ai-je tort, je me disais que ta tentative de paiement sur 
internet sollicitait le trousseau de Firefox.
Si tu estimes que je me trompe, il faudrait si possible détailler 
précisément le déroulement de ta tentative de paiement étape par étape, 
en occultant bien sûr toutes les données sensibles mais en donnant tous 
les autres détails pour mieux diagnostiquer


Ayant contourné le problème en ressaisissant tout je ne puis reproduire 
et donner le détail quoique mon premier message donne grosso-modo ce que 
j'ai fait:
Au moment de saisir mon n° de CB il me proposait de prendre des données 
déjà enregistrées, je choisis et là mot de passe du trousseau de clef 
que j'ai perdu.


Amitiés
--
Yannick VOYEAUD
Nul n'a droit au superflu tant que chacun n'a pas son nécessaire
(Camille JOUFFRAY 1841-1924, maire de Vienne)
http://www.voyeaud.org
Créateur CimGenWeb: http://www.francegenweb.org/cimgenweb/
Journées du Logiciel Libre: http://jdll.org
Généalogie en liberté avec Ancestris https://www.ancestris.org



OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Modify user PATH in GNOME in Debian 12

2023-11-23 Thread Max Nikulin

On 23/11/2023 21:02, Greg Wooledge wrote:

Usually, creating ~/.xsessionrc (on Debian only, as it's specific to
Debian) will suffice for this, as it gets read in by the X session
before it spawns your window manager, and then the WM spawns everything
else, all with your desired environment.  (Again, assuming X, not Wayland.)


I would verify that changes are reflected in

systemctl --user show-environment

output. XDG autostart instances, applications activated through D-Bus 
may be spawned by systemd user session, not X session & window manager.


Greg, do you have ideas how to relieve pain with environment 
configuration? E.g. to not override pam_environment by PATH hardcoded in 
/etc/profile, to negotiate what files display managers should read, etc.




Re: Modify user PATH in GNOME in Debian 12

2023-11-23 Thread Max Nikulin

On 23/11/2023 21:16, Greg Wooledge wrote:

For this setup, I'd go with the ~/.xsessionrc file.  Create the
file/home/gene/.xsessionrc and put this in it:

 PATH=$HOME/bin:$HOME/AppImages:$PATH


SDDM (default for KDE and I assume it is Gene's case) reads ~/.profile 
that contains the following


 >8 
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
 8< 

so perhaps it is enough to add similar blocks for other custom 
directories. In Ubuntu LightDM reads this file as well, but in Debian it 
is not so by default.





Installation d'un paquet pour un groupe d'utilisateur

2023-11-23 Thread Alex PADOLY

Bonsoir à tous,

Sur un serveur LTSP, comment peut-on faire pour installer un logiciel 
pour un utilisateur ou un groupe d'utilisateur.


Sans certitude, je pense que cela pourrait se faire avec dpkg -i.

Merci pour vos réponses.

Re: Trousseau de clefs

2023-11-23 Thread Yannick

Le 23/11/2023 à 16:02, didier gaumet a écrit :

Le 23/11/2023 à 15:56, Yannick a écrit :


Bonsoir Didier,

Ce n'est pas ce que je cherche.
C'est le trousseau de clefs que je cherche et pas mes mots de passe de 
site; le mot de passe principal est connu et utilisé.


Amitiés et merci quand même


Désolé, je ne comprends pas quel est ton problème: j'avais cru saisir 
que tu enregistres les mots de passe des sites web visités dans le 
trousseau de Firefox, celui-ci étant chez toi (c'est une option pas 
obligatoire) protégé par un mot de passe principal que tu avais perdu? 
Si tu ne l'as pas perdu quel est le souci?


Bonsoir,

C'est le mot de passe du trousseau de clefs donc à priori Debian
J'ai regardé dans ce que tu m'as conseillé et je n'ai pas trouvé ce mot 
de passe spécifique


Amitiés
--
Yannick VOYEAUD
Nul n'a droit au superflu tant que chacun n'a pas son nécessaire
(Camille JOUFFRAY 1841-1924, maire de Vienne)
http://www.voyeaud.org
Créateur CimGenWeb: http://www.francegenweb.org/cimgenweb/
Journées du Logiciel Libre: http://jdll.org
Généalogie en liberté avec Ancestris https://www.ancestris.org



OpenPGP_signature.asc
Description: OpenPGP digital signature


Installation du paquet Dbus-X11

2023-11-23 Thread Alex PADOLY

Bonsoir,

J'ai un problème d'identification sur le serveur LTSP, la résolution de 
ce serveur nécessite l'installation du paquet Dbus-x11


À l'installation, j'ai énormément de problème de dépendances qui ne sont 
pas satisfaites:


- Peut-on contourner le problème sans installer Dbus-x11;

- peut-on forcer l'installation du paquet Dbus-x11;

- Dois-je faire évoluer mon système vers SID.

Merci pour vos conseils

Re: Trousseau de clefs

2023-11-23 Thread Yannick

Le 23/11/2023 à 15:32, didier gaumet a écrit :

Le 23/11/2023 à 14:32, Yannick a écrit :

Bonjour,

J'ai un soucis que je peux contourner mais j'aimerais mieux revenir à 
une situation normale.


Hier j'ai voulu effectuer un paiement en ligne sous Firefox 119. Il 
m'a proposé de récupérer les données déjà enregistrées dans le 
trousseau de clefs. Rien que de très normal.

Mais voilà j'ai perdu le mot de passe de ce trousseau.
Comment le retrouver et le réinitialiser?

Votre réponse doit faire du pas à pas. Je ne suis pas doué.

Amitiés


"Attention ! Effacer votre mot de passe principal supprime tous vos 
identifiants et mots de passe enregistrés."

(Donc commence par les exporter:
https://support.mozilla.org/fr/kb/exportation-donnees-connexion-firefox )

la manip est là:
https://support.mozilla.org/fr/kb/reinitialiser-mot-passe-principal-oublie





Bonsoir Didier,

Ce n'est pas ce que je cherche.
C'est le trousseau de clefs que je cherche et pas mes mots de passe de 
site; le mot de passe principal est connu et utilisé.


Amitiés et merci quand même
--
Yannick VOYEAUD
Nul n'a droit au superflu tant que chacun n'a pas son nécessaire
(Camille JOUFFRAY 1841-1924, maire de Vienne)
http://www.voyeaud.org
Créateur CimGenWeb: http://www.francegenweb.org/cimgenweb/
Journées du Logiciel Libre: http://jdll.org
Généalogie en liberté avec Ancestris https://www.ancestris.org



OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Problème avec Firefox esr 64 bits

2023-11-23 Thread didier gaumet

Le 23/11/2023 à 12:01, ajh-valmer a écrit :

Hello,
Je suis sous Firefox 64 bits 115.4.0 esr (64 bits).
Depuis que j'ai changé de FAI vers Orange,
Firefox se bloque, tous les sites que je veux atteindre,
ça mouline, impossible de continuer à naviguer.
Seule solution, fermer toutes les pages Firefox en cours,
et le redémarrer, jusqu'au prochain blocage...

Bonne journée.
A. Valmer


Bonjour,

Tu as essayé un autre navigateur pour vérifier qu'il ne s'agit d'un 
problème spécifique à Firefox et pas d'un problème plus global?




Re: Trousseau de clefs

2023-11-23 Thread didier gaumet

Le 23/11/2023 à 14:32, Yannick a écrit :

Bonjour,

J'ai un soucis que je peux contourner mais j'aimerais mieux revenir à 
une situation normale.


Hier j'ai voulu effectuer un paiement en ligne sous Firefox 119. Il m'a 
proposé de récupérer les données déjà enregistrées dans le trousseau de 
clefs. Rien que de très normal.

Mais voilà j'ai perdu le mot de passe de ce trousseau.
Comment le retrouver et le réinitialiser?

Votre réponse doit faire du pas à pas. Je ne suis pas doué.

Amitiés


"Attention ! Effacer votre mot de passe principal supprime tous vos 
identifiants et mots de passe enregistrés."

(Donc commence par les exporter:
https://support.mozilla.org/fr/kb/exportation-donnees-connexion-firefox )

la manip est là:
https://support.mozilla.org/fr/kb/reinitialiser-mot-passe-principal-oublie





Re: Modify user PATH in GNOME in Debian 12

2023-11-23 Thread Greg Wooledge
On Thu, Nov 23, 2023 at 05:43:18AM -0500, gene heskett wrote:
> I'm user 1000 and have had the expected results by putting a modified path
> in my .profile but it is not automatic, I have to . .profile for every
> terminal I start. I have 2 non-stock dirs in my /home/me path, bin and
> AppImages, and I put them ahead of the rest of the default path. Now if
> someone would tell me how to make that automatic I'd be delighted.

There's nothing that will work in *all* setups.  You have to do what
works for *your* setup.

Last I heard, you use a third-party desktop environment (Trinity or
something like that), and from your context above it looks like you use a
GUI Display Manager to login.  I also believe you're using an X session
(not Wayland) and I'm guessing that your DE is normal, not GNOME-like,
in its terminal spawning.

For this setup, I'd go with the ~/.xsessionrc file.  Create the
file /home/gene/.xsessionrc and put this in it:

PATH=$HOME/bin:$HOME/AppImages:$PATH
GENETEST=hello
export PATH GENETEST

Then on your next login, see whether you have the correct PATH, and
whether you have the GENETEST variable in your environment (this is just a
debugging aid, to be sure the file was used).  If all works as expected,
you can get rid of the GENETEST variable later.  It shouldn't hurt
anything, just uses a few extra bytes of memory, so it's a low priority.

If you don't get the GENETEST variable in any program's environment,
then your OS isn't Debian enough (or your DE clears it out, or your
terminals are spawned in a GNOME-like manner...), and you'll have to
find a different solution.



Re: Modify user PATH in GNOME in Debian 12

2023-11-23 Thread Greg Wooledge
NOTE: the original Subject: header of this thread includes the keyword
"GNOME" which does not appear in the body of the original message, but
which is *terribly* important here.  See below.

On Thu, Nov 23, 2023 at 09:49:13AM +, Bernhard Walle wrote:
> I want to add some directory to $PATH for each user. In the past, I added a
> file /etc/profile.d/path.sh, but that doesn't work any more, only when I
> manually start bash as login shell (or modify the setting of
> gnome-terminal).

OK, good.  You already understand the basics, so we don't need to explain
those in detail.

> My next attempt was to use systemd's /etc/environment.d/path.conf
> 
> PATH=${PATH}:/opt/vendor/product/bin
> XPATH=${PATH}:/opt/vendor/product/bin
> 
> but that doesn't work either. While XPATH appears, PATH is still the
> default.
> 
> systemctl show-environment --user

"systemctl --user" does not show you the environment that a login
session uses.  It only shows you the environment that the "per-user
service manager" uses when it starts --user units.

Systemd actually has nothing to do with login session configuration
at all.  It's a gigantic dead end.

> To be honest, I'm quite confused where that default path is defined. Even
> when I modify /etc/login.defs (ENV_PATH) or /etc/profile, I still get the
> default value.

/etc/login.defs only works with the login(1) program, which is for the
console.  Even then, the value of PATH set by login(1) can and will be
overridden by other programs before you finally get a shell prompt.
Among those overrides are PAM (see pam_env(7)) and your shell (as you
already knew, since you mentioned /etc/profile).

As such, ENV_PATH in /etc/login.defs is pretty much useless.  It's never
going to survive to see the light of day, even on a console login.  And
it's not used at all by Display Manager (GUI) logins.

Even pam_env ends up being useless for PATH, as the shell overrides it.
It might be useful to set *other* variables, but it's extremely limited.
You can set MYVAR=/some/absolute/path but you *cannot* for example set
MAIL=$HOME/Maildir/ because it will not expand $HOME for you.  It's
just so frustatingly inept that you ultimately end up forgetting about
it (but not until you've wasted hours trying to get it to work).

> Of course I can edit my own ~/.bashrc or /etc/bashrc, but that's not what I
> want since then only bash gets the PATH environment, not other shells or
> other programs.

The sad news is that there IS no holy grail here.  I've searched for it
myself, as have many other people.  It just *does not* exist.

There is no single point of configuration that can customize all user
login sessions, across all login methods, all shells, all desktop
environments, etc.

What ends up happening in practice is that you have to identify *all*
of the configuration points for all of the login methods and shells
that you care about.  For console logins with Bourne-family shells,
you can customize a default PATH in /etc/profile (or one of the files
that it dots in).  For console logins with csh-family shells, you can
use /etc/csh.login.  For Debian X sessions, there is no recommended
global access point, but you can create a ~/.xsessionrc file in your
home directory.  I don't know how you do it with Wayland.  Nobody who
uses Wayland has ever cared enough to figure it out and publically
announce how to do it (or at least, not here).

Now, I mentioned GNOME at the top of this reply, because GNOME was in the
Subject: header.  This is important because GNOME adds one additional
wrinkle to this problem.  In a normal X session, there is a single
parent process from which all the other X client processes are spawned.
Getting the correct environment into that parent process is sufficient
to have it propagated into every program that gets launched thereafter.
Usually, creating ~/.xsessionrc (on Debian only, as it's specific to
Debian) will suffice for this, as it gets read in by the X session
before it spawns your window manager, and then the WM spawns everything
else, all with your desired environment.  (Again, assuming X, not Wayland.)

Not so with GNOME.  In GNOME, all gnome-terminal processes are spawned
by dbus, instead of by the user's X/Wayland session.  Therefore,
gnome-terminal and the shell inside it derive from a completely
different ancestry, and come up with a completely different environment.
(And don't even ask me how to configure dbus's environment.  I have no
idea.)

So, *specifically* for GNOME, what you end up doing in practice is
precisely the thing you didn't want to do: customizing ~/.bashrc or
~/.cshrc or whatever shell-equivalent RC file, to establish the desired
environment in the shell itself, bypassing whatever crap dbus gives you.



Trousseau de clefs

2023-11-23 Thread Yannick

Bonjour,

J'ai un soucis que je peux contourner mais j'aimerais mieux revenir à 
une situation normale.


Hier j'ai voulu effectuer un paiement en ligne sous Firefox 119. Il m'a 
proposé de récupérer les données déjà enregistrées dans le trousseau de 
clefs. Rien que de très normal.

Mais voilà j'ai perdu le mot de passe de ce trousseau.
Comment le retrouver et le réinitialiser?

Votre réponse doit faire du pas à pas. Je ne suis pas doué.

Amitiés
--
Yannick VOYEAUD
Nul n'a droit au superflu tant que chacun n'a pas son nécessaire
(Camille JOUFFRAY 1841-1924, maire de Vienne)
http://www.voyeaud.org
Créateur CimGenWeb: http://www.francegenweb.org/cimgenweb/
Journées du Logiciel Libre: http://jdll.org
Généalogie en liberté avec Ancestris https://www.ancestris.org



OpenPGP_signature.asc
Description: OpenPGP digital signature


Boot fails to load network or USB, piix4_smbus - SMBus Host Controller, after update to dbus (1.14.10-3) unstable

2023-11-23 Thread Andy Dorman
This may actually be a usrmerge problem, both usrmerge and usr-is-merged 
(>= 38~) are installed). But I do not know enough about how firmware 
controllers are loaded during boot to determine which package, dbus or 
usrmerge, I should submit a bug report to.


We have multiple old (14+ years) Tyan S3950 mobo servers running debian 
Unstable with various recent kernels, the latest being 6.1.0-3-amd64.


Despite being on the bleeding edge with the unstable distro, this has 
been a very reliable setup over the years. I love Debian.  However, 
after a recent update, we had to reboot a couple of servers and both 
booted with NO network or usb console keyboard. ie, completely unusable.


I have been able to mount the failed server HDs on another server and 
compared dmesg logs from the failed and last successful boots. The 
failed boots were not detecting the floppy (I told you they were old) 
and not loading the kernel piix4_smbus driver. These are the key lines 
present in the earlier good boots and missing from the failed boots:


...
Floppy drive(s): fd0 is 1.44M
piix4_smbus :00:02.0: SMBus Host Controller at 0x580, revision 0
...

A failed boot did not have the above lines and subsequently failed to 
detect and enable the network interfaces, the console USB keyboard or 
any other usb devices.


FWIW, the 3ware RAID drivers are still loading fine in the bad boots. So 
some drivers are still loading.


I think this problem stems from the ongoing Debian move to a merged-/usr 
system. I have fully and successfully (I thought) installed both the 
usrmerge and usr-is-merged (>= 38~). The only hint I have is the last 
dbus package update contained a warning about assuming that a system is 
fully merged-/usr system "In the case of dbus, the symptom when this 
assumption is broken is particularly bad (various key system services 
will not start"...which sums up my problem quite nicely.


I will be happy to submit a formal bug report to the appropriate package 
using reportbug as soon as someone with way more knowledge than I tells 
me which package would be more appropriate to receive it. The last thing 
I want to do is create unnecessary work for anyone in the Debian community.


Thank you in advance for any help in fixing this problem.

--
Andy Dorman
Ironic Design, Inc.
AnteSpam.com



Re: bash vs. dash and stdin

2023-11-23 Thread Max Nikulin

On 22/11/2023 19:17, Greg Wooledge wrote:

On Wed, Nov 22, 2023 at 07:06:58PM +0700, Max Nikulin wrote:


ssh localhost echo remote
echo local


This is like .  ssh grabs
all of the stdin (until EOF) and leaves none for bash.


Thanks. I expected to find it among pitfalls.


I don't know dash's internals.  Maybe dash reads an entire buffer's
worth of stdin at a time, instead of a command at a time as bash does.


It seems dash reads a block from stdin (and does not lseek back even for 
regular files) only for commands. I do not see significant difference 
when commands reading stdin are placed into a script


cmd='seq 100 | while read -r var ; do
  printf "%s\n" "$var" ;
  ssh localhost echo remote ;
done'
bash -c "$cmd"
dash -c "$cmd"


If the script is passed as an argument, not to stdin, then output contains
"local" in both cases.


Yes.  In that case, bash is not competing with ssh for stdin.


I have found an attempt to report it:

https://lore.kernel.org/dash/6640a8ee-eda0-1e35-df1a-c8b303440...@mail.de/
stdin should be consumed line by line. Fri, 22 Oct 2021 13:11:43 +0200

No response.



Problème avec Firefox esr 64 bits

2023-11-23 Thread ajh-valmer
Hello,
Je suis sous Firefox 64 bits 115.4.0 esr (64 bits).
Depuis que j'ai changé de FAI vers Orange,
Firefox se bloque, tous les sites que je veux atteindre,
ça mouline, impossible de continuer à naviguer.
Seule solution, fermer toutes les pages Firefox en cours,
et le redémarrer, jusqu'au prochain blocage...

Bonne journée.
A. Valmer



Re: Modify user PATH in GNOME in Debian 12

2023-11-23 Thread gene heskett

On 11/23/23 05:06, Bernhard Walle wrote:

Hello,

I want to add some directory to $PATH for each user. In the past, I 
added a file /etc/profile.d/path.sh, but that doesn't work any more, 
only when I manually start bash as login shell (or modify the setting of 
gnome-terminal).


My next attempt was to use systemd's /etc/environment.d/path.conf

     PATH=${PATH}:/opt/vendor/product/bin
     XPATH=${PATH}:/opt/vendor/product/bin

but that doesn't work either. While XPATH appears, PATH is still the 
default.


     systemctl show-environment --user

     PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
NCP_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/ncp/clnt/bin:/opt/ncp/clnt/bin

To be honest, I'm quite confused where that default path is defined. 
Even when I modify /etc/login.defs (ENV_PATH) or /etc/profile, I still 
get the default value.


Of course I can edit my own ~/.bashrc or /etc/bashrc, but that's not 
what I want since then only bash gets the PATH environment, not other 
shells or other programs.


Can somebody help me, please? Thanks a lot.


Kind regards,
Bernhard


I'm user 1000 and have had the expected results by putting a modified 
path in my .profile but it is not automatic, I have to . .profile for 
every terminal I start. I have 2 non-stock dirs in my /home/me path, bin 
and AppImages, and I put them ahead of the rest of the default path. Now 
if someone would tell me how to make that automatic I'd be delighted.




.


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: Displayport et audio => ko

2023-11-23 Thread Sébastien NOBILI

Bonjour,

Le 2023-11-23 09:24, Grégory Bulot a écrit :

Je n'ais pas d'interface graphique sur cette machine , donc pas de
pavucontrol possible (pas a ma connaissance)  ;-)


(Si le sous-entendu est que tant mieux qu'il n'y ait pas pulseaudio,
alors la suite ne t'intéressera probablement pas…)

Si tu es plus à l'aise avec pulseaudio, tu peux le lancer même si tu
n'as pas d'interface graphique :

```
pulseaudio --start
```

Si tu ajoutes cette ligne au fichier `/etc/pulse/default.pa`, alors tu
pourras le piloter via le réseau :

```
load-module module-native-protocol-tcp auth-anonymous=1 
auth-ip-acl=127.0.0.1;192.168.1.0/24

```

(n'oublie pas de redémarrer pulseaudio après la modification)

Depuis ton poste de travail qui a une interface graphique :

```
export PULSE_SERVER=...# Adresse IP de la machine sans interface 
graphique

pavucontrol
```

Sébastien



Re: Displayport et audio => ko

2023-11-23 Thread didier gaumet

Le 23/11/2023 à 09:24, Grégory Bulot a écrit :

Bonjour

Sous debian 12.2 (6.1.0-13-amd64) j'ai espoir d'avoir le son via le
display port (la video fonctionne)... c'est mal engagé pour l'instant,
je sollicite vos lumières.

c'est un OptiPlex 780 (SFF) core2duo

Je n'ais pas d'interface graphique sur cette machine , donc pas de
pavucontrol possible (pas a ma connaissance)  ;-
aplay -l
[...]
carte 0 : Intel [HDA Intel], périphérique 0 : AD1984A Analog [AD1984A
Analog] Sous-périphériques : 1/1
   Sous-périphérique #0 : subdevice #0
carte 0 : Intel [HDA Intel], périphérique 2 : AD1984A Alt Analog
[AD1984A Alt Analog]

aplay -L (n'affiche que des cartes "Analog"), exemple :
hw:CARD=Intel,DEV=0
 HDA Intel, AD1984A Analog
 Direct hardware device without any conversions

[...]

As-tu les firmwares nécessaires installés?
explorer les logs système pour trouver les fichiers de firmwares 
manquants (puis pour chaque fichier un apt-file search nom_du_fichier 
pour le paquet à installer)


à vue de nez, déjà vérifier que intel-microcode ou amd64-microcode est 
installé, ainsi que alsa-firmware-loaders, firmware-intel-sound, 
firmware-misc-nonfree.


Il peut aussi y avoir un firmware graphique manquant vu que Displayport 
c'est de l'audio/video
Vaut mieux avoir trop de firmwares que pas assez: sans ceux appropriés, 
ça ne fonctionne pas et il n'y a généralement aucune alternative libre.


Si ensuite ça ne fonctionne toujours pas, peut-être regarder du côté de 
la doc Alsa pour paramétrer en fonction de tes besoins:

https://www.alsa-project.org/wiki/Asoundrc
https://alsa.opensrc.org/MultipleCards
(plus d'autres éventuelels pages du wiki alsa)




Modify user PATH in GNOME in Debian 12

2023-11-23 Thread Bernhard Walle

Hello,

I want to add some directory to $PATH for each user. In the past, I 
added a file /etc/profile.d/path.sh, but that doesn't work any more, 
only when I manually start bash as login shell (or modify the setting of 
gnome-terminal).


My next attempt was to use systemd's /etc/environment.d/path.conf

PATH=${PATH}:/opt/vendor/product/bin
XPATH=${PATH}:/opt/vendor/product/bin

but that doesn't work either. While XPATH appears, PATH is still the 
default.


systemctl show-environment --user

PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

NCP_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/ncp/clnt/bin:/opt/ncp/clnt/bin

To be honest, I'm quite confused where that default path is defined. 
Even when I modify /etc/login.defs (ENV_PATH) or /etc/profile, I still 
get the default value.


Of course I can edit my own ~/.bashrc or /etc/bashrc, but that's not 
what I want since then only bash gets the PATH environment, not other 
shells or other programs.


Can somebody help me, please? Thanks a lot.


Kind regards,
Bernhard




Modify user PATH in GNOME in Debian 12

2023-11-23 Thread Bernhard Walle

Hello,

I want to add some directory to $PATH for each user. In the past, I 
added a file /etc/profile.d/path.sh, but that doesn't work any more, 
only when I manually start bash as login shell (or modify the setting of 
gnome-terminal).


My next attempt was to use systemd's /etc/environment.d/path.conf

PATH=${PATH}:/opt/vendor/product/bin
XPATH=${PATH}:/opt/vendor/product/bin

but that doesn't work either. While XPATH appears, PATH is still the 
default.


systemctl show-environment --user

PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

NCP_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/ncp/clnt/bin:/opt/ncp/clnt/bin


To be honest, I'm quite confused where that default path is defined. 
Even when I modify /etc/login.defs (ENV_PATH) or /etc/profile, I still 
get the default value.


Of course I can edit my own ~/.bashrc or /etc/bashrc, but that's not 
what I want since then only bash gets the PATH environment, not other 
shells or other programs.


Can somebody help me, please? Thanks a lot.


Kind regards,
Bernhard





Displayport et audio => ko

2023-11-23 Thread Grégory Bulot
Bonjour

Sous debian 12.2 (6.1.0-13-amd64) j'ai espoir d'avoir le son via le
display port (la video fonctionne)... c'est mal engagé pour l'instant,
je sollicite vos lumières.

c'est un OptiPlex 780 (SFF) core2duo

Je n'ais pas d'interface graphique sur cette machine , donc pas de
pavucontrol possible (pas a ma connaissance)  ;-) 


aplay -l
[...]
carte 0 : Intel [HDA Intel], périphérique 0 : AD1984A Analog [AD1984A
Analog] Sous-périphériques : 1/1
  Sous-périphérique #0 : subdevice #0
carte 0 : Intel [HDA Intel], périphérique 2 : AD1984A Alt Analog
[AD1984A Alt Analog]
[...]



aplay -L (n'affiche que des cartes "Analog"), exemple :
hw:CARD=Intel,DEV=0
HDA Intel, AD1984A Analog
Direct hardware device without any conversions





LANG=C lshw -c display,sound
  *-display:0
   description: VGA compatible controller
   product: 4 Series Chipset Integrated Graphics Controller
   vendor: Intel Corporation
[...]
  *-display:1 UNCLAIMED   (<= j'imagine que le problème est là)
   description: Display controller
   product: 4 Series Chipset Integrated Graphics Controller
   vendor: Intel Corporation
   physical id: 2.1
   bus info: pci@:00:02.1
[...]
*-multimedia
   description: Audio device
   product: 82801JD/DO (ICH10 Family) HD Audio Controller
   vendor: Intel Corporation
   physical id: 1b
   bus info: pci@:00:1b.0
   logical name: card0
   logical name: /dev/snd/controlC0
   logical name: /dev/snd/hwC0D2
   logical name: /dev/snd/pcmC0D0c
   logical name: /dev/snd/pcmC0D0p
   logical name: /dev/snd/pcmC0D2c
   logical name: /dev/snd/pcmC0D2p
   version: 02
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list
   configuration: driver=snd_hda_intel latency=0

lspci -nn | grep -i -e audio -e display
00:02.1 Display controller [0380]: Intel Corporation 4 Series Chipset
Integrated Graphics Controller [8086:2e13] (rev 03) 00:1b.0 Audio
device [0403]: Intel Corporation 82801JD/DO (ICH10 Family) HD Audio
Controller [8086:3a6e] (rev 02)



inxi -A 
Audio:
  Device-1: Intel 82801JD/DO HD Audio driver: snd_hda_intel
  API: ALSA v: k6.1.0-13-amd64 status: kernel-api


lshw | grep -A11 multimedia
*-multimedia
 description: Audio device
 produit: 82801JD/DO (ICH10 Family) HD Audio Controller
 fabriquant: Intel Corporation
 identifiant matériel: 1b
 information bus: pci@:00:1b.0
 nom logique: card0
 nom logique: /dev/snd/controlC0
 nom logique: /dev/snd/hwC0D2
 nom logique: /dev/snd/pcmC0D0c
 nom logique: /dev/snd/pcmC0D0p
 nom logique: /dev/snd/pcmC0D2c


lsmod | grep -i -e display -e snd -e audio -e sound
snd_hda_codec_analog20480  1
snd_hda_codec_generic98304  1 snd_hda_codec_analog
ledtrig_audio  16384  1 snd_hda_codec_generic
snd_hda_intel  57344  0
snd_intel_dspcfg   36864  1 snd_hda_intel
snd_intel_sdw_acpi 20480  1 snd_intel_dspcfg
snd_hda_codec 184320  3
snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_analog snd_hda_core
   122880  4
snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_analog,snd_hda_codec
snd_hwdep  16384  1 snd_hda_codec snd_pcm
159744  3 snd_hda_intel,snd_hda_codec,snd_hda_core snd_timer
  49152  1 snd_pcm snd   126976  7
snd_hda_codec_generic,snd_hwdep,snd_hda_intel,snd_hda_codec_analog,snd_hda_codec,snd_timer,snd_pcm
soundcore  16384  1 snd drm_display_helper184320  1
i915 cec61440  2 drm_display_helper,i915
drm_kms_helper204800  2 drm_display_helper,i915 drm
  614400  7 drm_kms_helper,drm_display_helper,drm_buddy,i915,ttm




Voilà qu'en pensez-vous ?