• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
devfs_make_node()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

devfs_make_node()


  • Subject: devfs_make_node()
  • From: Nick Blievers <email@hidden>
  • Date: Fri, 09 Nov 2007 10:47:16 +0800

Hi,

This is really an FYI more than anything. There is a bug in dev_finddir() that affects devfs_make_node() such that if you pass it a path that contains a directory, the directory will be created but the name will be truncated. This stems from a simple off by one error in dev_finddir().

Although I have raised a bug about this, I have been told that I shouldn't be trying to create directories as part of a device name. This problem was introduced in leopard with the shift away from unsafe string functions. So rather than strncpy(), strlcpy() has been used, without the appropriate length change.

I am curious what the reasons are that make it considered unsafe to create a subdirectory under /dev -- but mainly this email is to make people aware of a regression which exists in leopard that apparently will not get fixed.


Hope this helps someone,

Nick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: devfs_make_node()
      • From: Terry Lambert <email@hidden>
  • Prev by Date: Re: Kernel Debugging Help
  • Next by Date: Re: devfs_make_node()
  • Previous by thread: Re: Eject oddity
  • Next by thread: Re: devfs_make_node()
  • Index(es):
    • Date
    • Thread