IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Here is for now my last patch to the string handling for a rather
theorethical case, where the node is very very very long. :)
We have accordant to strfieldcat(to, from) now a strintcat(to, i) macro,
which appends the ascii representation of a integer to a string in a
safe way.
On Thu, Feb 12, 2004 at 05:26:37PM -0800, Greg KH wrote:
> On Fri, Feb 13, 2004 at 12:45:38AM +0100, Kay Sievers wrote:
> >
> > Here a few questions about my favorite file in the tree :)
> > - better permission handling
> >
> > What is missing here?
>
> I don't know for sure. Just a vague feeling that the way we currently
> handle permissions is pretty lousy. Anyone else feel this way too?
Seems that nobody cares and perhaps the recent klibc permission changes
and the multiple file config directory are enough to kill these lines? :)
Here we remove the useless leading "./" of the linktargets.
Thanks to Olaf Hering <olh@suse.de>, who asked why we do this :)
We have now:
/udev
|-- camera0 -> video0
|-- kamera0 -> video0
`-- video0
Mainly a cleanup of the earlier patches with a few missing pieces
and some cosmetical changes.
I've moved the udev_init_config() to very early init, otherwise we
don't get any logging for the processing of the input. What would I
do without gdb :)
Greg, it's the 7th patch in your box to apply. I will stop now and
wait for you :)
Here we truncate our input strings from the environment to our
defined limit. It's a bit theroretical but better check for it.
It cleans up some magic length definitions and removes the code
duplication in udev, udevtest and udevsend.
udevd needs to be killed after installation, cause the message size
is changed with this patch.
Should we do this with the 'make install', like we do with the '.udevdb'?
As promised, here is the next round. We provide in addition to the
already used macros:
strfieldcpy(to, from)
strfieldcat(to, from)
the corresponding friends, if the size of the target is not known and
must be provided by the caller:
strnfieldcpy(to, from, maxsize)
strnfieldcat(to, from, maxsize)
and switch nearly all possibly unsafe users of strcat(), strncat(),
strcpy() and strncpy() to these safer macros.
The last known remaining issue seems the use of sprintf() and
snprintf(). I will take on it later today or tomorrow.
Hey it's not longer the "goal" to provide a dynamic dev directory,
we have just arrived. So I change it to more self-confident words :)
I've also added the completly missing environment variables to the
man pages.
To stop the misuse of the PROGRAM= call paramenters, we better mention
its limitations.
On Tue, Feb 24, 2004 at 11:50:52PM +0100, Kay Sievers wrote:
> Here is the first step towards a safer string handling.
> More will follow, but for now only the easy ones :)
>
> Thanks to all who pointed this out. strncat() isn't a nice function. We
> all should remember that the destination string is not terminated if the
> given lenght is shorter than the strlen of the source string.
>
> And shame on the various implementers of strfieldcat() I found in the
> unapplied patches on this list, it's not really better than strncpy()
> and hides the real problem.
Hmm, bk didn't checked in one file, maybe I edited it again as root.
Nevermind, here is the more complete version.
I was on the train for 5 hours today and the TODO is almost empty :)
So, at least four people wanted this feature, then here is a actual
working patch.
We may specify now in udev.conf:
udev_rules="/etc/udev/"
and udev will scan the whole directory for files ending with *.rules,
sort it in lexical order and create our rule list from all of the files.
A plain given file will still work and the same applies to the *.permissions.
I sort the files in our usual linked list, cause klibc has no scandir().
Here we get a very dumb getpwnam() and getgrnam() for klibc to
stop the confusion of not handling textual id's if klibc is used.
If used with initrd we just need to copy the /etc/passwd and /etc/group
file and all should work well.
I dualboot between 2.4.x and 2.6.x right now, and although I
want udev to start up when 2.6 is booting, I don't want it to try when
2.4.x is booting.
This is a small patch to not start up udev if sysfs is not
mounted.
Here we change the magic callout part number selector to the new
atribute syntax. The syntax to select the second part of the callout string:
'%2c' is now '%c{2}'
I think it's more clear and we no longer misuse the length argument.
The old syntax is still supported, but we should remove it some
time in the future.
Here we switch the configs and man pages to the new attribute syntax.
Also the 'partition trick' is mentioned in udev.8
I think it's more clear visible now, that inside the brackets are user
supplied values used and not some magic keys handled:
'SYSFS_dev' is now 'SYSFS{dev}'
The old syntax is still supported.