=D0=92 =D0=9F=D1=82=D0=BD, 30/09/2005 =D0=B2 11:02 +0100, Anton Altaparmako=
v =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
> > --- attrib.c 28 Sep 2005 13:47:47 -0000 1.178
> > +++ attrib.c 30 Sep 2005 09:52:05 -0000 1.179
> > @@ -2554,7 +2554,7 @@ int ntfs_resident_attr_record_add(ntfs_i
> > }
> > =20
> > /* Locate place where record should be. */
> > - ctx =3D ntfs_attr_get_search_ctx(ni, NULL);
> > + ctx =3D ntfs_attr_get_search_ctx(NULL, ni->mrec);
> > if (!ctx)
> > return -1;
> > if (!ntfs_attr_lookup(type, name, name_len,
> > @@ -2679,7 +2679,7 @@ int ntfs_non_resident_attr_record_add(nt
> > }
> > =20
> > /* Locate place where record should be. */
> > - ctx =3D ntfs_attr_get_search_ctx(ni, NULL);
> > + ctx =3D ntfs_attr_get_search_ctx(NULL, ni->mrec);
> > if (!ctx)
> > return -1;
> > if (!ntfs_attr_lookup(type, name, name_len, CASE_SENSITIVE,
> > @@ -3342,7 +3342,7 @@ int ntfs_attr_record_move_to(ntfs_attr_s
> > =20
> > /* Find place in MFT record where attribute will be moved. */
> > a =3D ctx->attr;
> > - nctx =3D ntfs_attr_get_search_ctx(ni, NULL);
> > + nctx =3D ntfs_attr_get_search_ctx(NULL, ni->mrec);
> > if (!nctx) {
> > err =3D errno;
> > Dprintf("%s(): Couldn't obtain search context.\n",
>=20
> The above three will now always fail when name !=3D NULL in the call to
> ntfs_attr_lookup(). You must use ntfs_attr_find() instead.
Why you add such check? What problems can happen in case sensitive
lookup?
--=20
Best regards,
Yura
|