The DM can do whatever he wants, as long as its in good faith.
There's only 1 thing that is a big no for me: Fudging. You do it, you a bad DM. Respect the dice, if you dont want a probability of success, don't ask for a roll.
I had started to answer this, and changed my mind but since
@Reynard wants a show, I'll do my best to provoke a conversation.
I don't agree that Fudging is the sinq qua non of bad GMing. I do think that in general it's a sign of low skill GMing, and that the better the GM the less they find they need to fudge. In general, the number times that I've fudged and regretted it is much higher than the number of times I've not fudged and regretted it. The problem with fudging is that it is almost always railroading, and almost all railroading is bad. Further, it has a particular problem in that most of the time you are tempted to fudge in response to a streak of bad luck, and you don't actually know what the future is going to hold. The party may have rolled really well for two rounds and the BBEG rolls badly, and you fudge to try to make the fight more exciting, and then the party will start rolling badly, and now all the sudden you find yourself having to fudge to keep from killing PC's that are only threatened because you fudged the rolls in an earlier round. It's just better to prep better and then let the dice fall where they may.
However, there is good railroading. In my essay on Railroading I noted that Railroading is bad because it takes away player agency, but that it could be justified in cases where Railroading actually created player agency or at least didn't harm it. This is true because the players often are in situations where they don't have enough information to make an informed choice, and if by railroading you can put the party into situations that they can make informed choices their agency actually improves.
An example of harmless fudging is refusing the result of a random encounter roll or random magic item roll. No player agency is lost in this, and refusing the result of the roll is often good for the campaign. For example, I had a party that was traversing a jungle and had already encountered two random warbands of (juju) zombie warriors. I then randomly rolled a third such encounter. That encounter would have served no purpose. It would have been redundant, and the two prior encounters had already established the fiction "there are a bunch of zombies roaming around these parts". The party by this point even had some vague understanding of why the jungle had a bunch of more intelligent than usual zombies trying to keep people out of it. So I refused the dice roll, and rolled again to try to find a more interesting encounter. The random encounter table only existed as an aid to my imagination in having diverse encounters in the jungle. Selecting something off of it didn't represent railroading. I just find that often randomness gives me more interesting ideas than I would have come up with otherwise while reducing prep time because I don't have to prep thousands of encounters for a whole region. And the same is true of needing to improvise treasure placement. If a random treasure results in a cursed item that would derail the game at this level, or some other item that doesn't add to the fun, roll again or pick something else.
But there are times even railroading is better than not railroading. One of the mistakes I've made as a GM I most regret happened while I was running weekly 3e D&D open tables one summer at a local gaming store. I had started out running Trad mini-adventures with varying success (some were very well received, some were inherently linear because of time constraints and weren't), but was getting burned out over the 20 or so hours required to prep 4 hour sessions. So I switched to Old School delve format in a massive megadungeon which let me get prep time down to like 1:1. These were hugely popular and I started getting 12+ players showing up each week, which really stretched my ability to stay in control of the game beyond its limit. I had new players each week. I had very little idea what character they were playing (you were allowed to show up with a prior character or a 5th level RAW legal character including wealth by level). I was overwhelmed by requests and just managing in my head the fictional space that has more than 12 PCs in it.
Anyway, one week in this chaos we got started playing and the regulars wanted to continue exploration where they had left off the week before. The first room they went into had a large treasure chest at the rear of it and a summoning trap that brought in a pretty easy (diversionary) encounter that brought in IRC like 12 manes and a 5th level imp bard. The won the fight easily in like 15 minutes of play and then the party thieves started checking the chest. "Is it a mimic?" "I poke it." "I check it for traps." "Is it locked?" etc. while table talk is going on in the background by those not immediately involved with the chest. They get the chest opened, and inscribed on the inside lid of the chest is a symbol of fear - everyone in the room panic, no save. This trap was not designed to be lethal. It was designed to split the party and create a few tense moments. So I started rolling for where everyone that is panicking ends up. A few end up back the way they came. A few go down a new corridor and end up in a fight with some kobolds and a 5th level kobold sorcerer. However, purely randomly and unexpectedly, two end up going down a corridor with a rolling boulder trap, which in their panicked state they trigger. So for those two I decide to resolve the situation first, and one of them makes his save and takes half damage and the other doesn't and takes full damage. So I roll something like 6d10 damage and describe to them how they are smashed to the floor or wall in the darkness by an unseen force, and that they wake up from their panicked in a darkened room battered and bleeding.
The one that failed the save apparently was playing a brand new 5th level wizard, and he looks up at me and says, "I'm at -10, I'm dead." Now this guy it turns out had been invited by a friend who drove in from 90 minutes away and he'd gotten like 20 minutes of gaming in which he made basically no choices and his character was dead as a result of something he didn't do for which he didn't really even get a saving throw for - and he was going to be out of the nights session for most of it. In my defense, were this a normal session with six players I knew this probably would have never happened. I would have taken more care to find everyone's fictional positioning and made sure everyone understood what was happening and what their involvement was and I probably wouldn't have had to fudge. But in this situation, I should have fudged. And if I wasn't running a game for like 12 people on a 4 hour clock, I probably would have thought to fudge just enough to make sure the PC did die a stupid pointless undeserved death like that was possibly partially my fault for not managing the players in the background better.
Amazingly after that unfair treatment, he came back and became a regular, but his successful PC multi-classed into fighter for the sake of not being so darn squishy even if it meant giving up spell-levels. (I told him afterwards that no pure wizard had ever survived more than a few sessions and he took the advice.)