lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Apr 2008 16:06:02 +0000
From:	"Fischer, Anna" <anna.fischer@...com>
To:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Duplicate SYSFS entries???

I'm creating a SYSFS hierarchy that consists of several symlinks that I'm generating by calling sysfs_create_link(). However, I realized that when I'm calling this with a link name that is already in the directory, I actually don't get an error back but the kernel creates another symlink with the same name, but the destination of the link is arbitrary. For example, this has created the following structure under SYSFS on my system:

ls -l /X

total 0
lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:13:21:1f:2d:35 -> ../../../vnetmod/vms/vm0
lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:50:56:19:a6:01 -> ../../../vnetmod/vms/vm13
lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:50:56:19:a6:01 -> ../../../vnetmod/vms/vm13
lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:50:56:19:a6:01 -> ../../../vnetmod/vms/vm13
lrwxrwxrwx 1 root root 0 2008-04-22 16:37 00:50:56:19:a6:01 -> ../../../vnetmod/vms/vm13


Actually, I have created the symlinks with different target directories but they all (obviously) point to the same one (vm13). Shouldn't the kernel return an error code and disallow the creation of multiple files (or symlinks) with the same name in the same directory??

I'm running kernel version 2.6.16.13-4-smp #1 SMP Wed May 3 04:53:23 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux.

Many thanks,
Anna
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ