| Summary: | KDE Partition Manager deletes davfs entry from /etc/fstab | ||
|---|---|---|---|
| Product: | [Applications] partitionmanager | Reporter: | Michael Ehrlichman <ehrlichman.m> |
| Component: | general | Assignee: | Andrius Štikonas <andrius> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 21.08.1 | ||
| Target Milestone: | --- | ||
| Platform: | Kubuntu | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/system/kpmcore/commit/5ffc5c6f238c70735637035456a9484f4f0f41dd | Version Fixed/Implemented In: | 22.04.0 |
| Sentry Crash Report: | |||
|
Description
Michael Ehrlichman
2022-01-05 08:48:46 UTC
Does URL contain any # characters? The davfs entry does not contain # characters. Here is a less redacted fstab entry: https://abdc.net/remote.php/webdav/myfolder /home/einstein/myfolder davfs _netdev,noexec,nosuid,user,uid=einstein 0 3 (In reply to Michael Ehrlichman from comment #2) > The davfs entry does not contain # characters. Here is a less redacted > fstab entry: > > https://abdc.net/remote.php/webdav/myfolder /home/einstein/myfolder davfs > _netdev,noexec,nosuid,user,uid=einstein 0 3 Thanks. Hmm right now I don't immediately see what's going wrong here. I thought # might be tripping in one of these two lines https://invent.kde.org/system/kpmcore/-/blob/master/src/core/fstab.cpp#L71 https://invent.kde.org/system/kpmcore/-/blob/master/src/core/fstab.cpp#L88 but I guess something else is going on. Perhaps a clue: If I put a "/" at the front of the dafvs line i.e. replace "https" with "/https" then the bug goes away. Of course putting a slash there is not a fix, I am simply trying to find clues as to what is wrong with the text processing. (In reply to Michael Ehrlichman from comment #4) > Perhaps a clue: If I put a "/" at the front of the dafvs line i.e. > replace "https" with "/https" then the bug goes away. > > Of course putting a slash there is not a fix, I am simply trying to find > clues as to what is wrong with the text processing. I think that suggest bug in static void parseFsSpec(const QString& m_fsSpec, FstabEntry::Type& m_entryType, QString& m_deviceNode) function. We don't hit any of the "if/else" cases there. That sounds right. As you probably expect, if I prefix the line with "UUID=", then the line is not deleted.
So an addition like the following, or perhaps a check for fsType=='davfs', would work, no?
} else if (m_fsSpec.startsWith(QStringLiteral("http"))) {
m_entryType = FstabEntry::Type::netdev;
m_deviceNode = m_fsSpec;
(In reply to Michael Ehrlichman from comment #6) > That sounds right. As you probably expect, if I prefix the line with > "UUID=", then the line is not deleted. > > So an addition like the following, or perhaps a check for fsType=='davfs', > would work, no? > > } else if (m_fsSpec.startsWith(QStringLiteral("http"))) { > m_entryType = FstabEntry::Type::netdev; > m_deviceNode = m_fsSpec; Hmm, perhaps just setting m_deviceNode = m_fsSpec before all those if/else blocks work, let me test. (In reply to Andrius Štikonas from comment #7) > (In reply to Michael Ehrlichman from comment #6) > > That sounds right. As you probably expect, if I prefix the line with > > "UUID=", then the line is not deleted. > > > > So an addition like the following, or perhaps a check for fsType=='davfs', > > would work, no? > > > > } else if (m_fsSpec.startsWith(QStringLiteral("http"))) { > > m_entryType = FstabEntry::Type::netdev; > > m_deviceNode = m_fsSpec; > > Hmm, perhaps just setting m_deviceNode = m_fsSpec before all those if/else > blocks work, let me test. Actually it looks like things are going wrong during write stage: https://invent.kde.org/system/kpmcore/-/blob/master/src/core/fstab.cpp#L280 Git commit 5ffc5c6f238c70735637035456a9484f4f0f41dd by Andrius Štikonas. Committed on 05/01/2022 at 23:00. Pushed by stikonas into branch 'master'. Fix davfs entries being omitted from fstab file. M +4 -2 src/core/fstab.cpp M +1 -1 src/core/fstab.h https://invent.kde.org/system/kpmcore/commit/5ffc5c6f238c70735637035456a9484f4f0f41dd |